@scalar/api-reference 1.35.1 → 1.35.3
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 +32 -0
- package/dist/browser/standalone.js +13534 -13691
- package/dist/browser/webpack-stats.json +1 -1
- package/dist/components/ApiReference.vue.d.ts +2 -1
- package/dist/components/ApiReference.vue.d.ts.map +1 -1
- package/dist/components/ApiReference.vue.js +14 -11
- package/dist/components/ApiReferenceLayout.vue.d.ts.map +1 -1
- package/dist/components/ApiReferenceLayout.vue.js +2 -2
- package/dist/components/ApiReferenceLayout.vue2.js +70 -72
- package/dist/components/Content/ClientLibraries/ClientLibraries.vue.d.ts +3 -1
- package/dist/components/Content/ClientLibraries/ClientLibraries.vue.d.ts.map +1 -1
- package/dist/components/Content/Content.vue.d.ts +0 -2
- package/dist/components/Content/Content.vue.d.ts.map +1 -1
- package/dist/components/Content/Content.vue.js +80 -80
- package/dist/components/Content/Models/ClassicLayout.vue.d.ts +5 -2
- package/dist/components/Content/Models/ClassicLayout.vue.d.ts.map +1 -1
- package/dist/components/Content/Models/ClassicLayout.vue.js +2 -2
- package/dist/components/Content/Models/ClassicLayout.vue2.js +43 -45
- package/dist/components/Content/Models/ClassicLayout.vue3.js +2 -2
- package/dist/components/Content/Models/Models.vue.d.ts +2 -2
- package/dist/components/Content/Models/Models.vue.d.ts.map +1 -1
- package/dist/components/Content/Models/Models.vue.js +27 -20
- package/dist/components/Content/Models/ModernLayout.vue.d.ts +5 -2
- package/dist/components/Content/Models/ModernLayout.vue.d.ts.map +1 -1
- package/dist/components/Content/Models/ModernLayout.vue.js +2 -2
- package/dist/components/Content/Models/ModernLayout.vue2.js +48 -52
- package/dist/components/Content/Operations/TraversedEntry.vue.d.ts +3 -2
- package/dist/components/Content/Operations/TraversedEntry.vue.d.ts.map +1 -1
- package/dist/components/Content/Operations/TraversedEntry.vue.js +33 -32
- package/dist/components/Content/Operations/TraversedEntryContainer.vue.d.ts +2 -2
- package/dist/components/Content/Operations/TraversedEntryContainer.vue.d.ts.map +1 -1
- package/dist/components/Content/Operations/TraversedEntryContainer.vue.js +1 -1
- package/dist/components/Content/Schema/Schema.vue.d.ts +6 -22
- package/dist/components/Content/Schema/Schema.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/Schema.vue.js +2 -2
- package/dist/components/Content/Schema/Schema.vue2.js +86 -140
- package/dist/components/Content/Schema/SchemaComposition.vue.d.ts +15 -4
- package/dist/components/Content/Schema/SchemaComposition.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaComposition.vue.js +77 -138
- package/dist/components/Content/Schema/SchemaEnumValues.vue.d.ts +2 -13
- package/dist/components/Content/Schema/SchemaEnumValues.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaEnumValues.vue.js +2 -2
- package/dist/components/Content/Schema/SchemaEnumValues.vue2.js +66 -92
- package/dist/components/Content/Schema/SchemaHeading.vue.d.ts +2 -2
- package/dist/components/Content/Schema/SchemaHeading.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaHeading.vue.js +2 -2
- package/dist/components/Content/Schema/SchemaHeading.vue2.js +19 -17
- package/dist/components/Content/Schema/SchemaObjectProperties.vue.d.ts +5 -14
- package/dist/components/Content/Schema/SchemaObjectProperties.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaObjectProperties.vue.js +47 -68
- package/dist/components/Content/Schema/SchemaProperty.vue.d.ts +4 -13
- package/dist/components/Content/Schema/SchemaProperty.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaProperty.vue.js +2 -2
- package/dist/components/Content/Schema/SchemaProperty.vue2.js +116 -144
- package/dist/components/Content/Schema/SchemaPropertyExamples.vue.d.ts +1 -1
- package/dist/components/Content/Schema/SchemaPropertyExamples.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaPropertyExamples.vue.js +2 -2
- package/dist/components/Content/Schema/SchemaPropertyHeading.vue.d.ts +9 -4
- package/dist/components/Content/Schema/SchemaPropertyHeading.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaPropertyHeading.vue.js +2 -2
- package/dist/components/Content/Schema/SchemaPropertyHeading.vue2.js +173 -204
- package/dist/components/Content/Schema/helpers/get-ref-name.d.ts +11 -0
- package/dist/components/Content/Schema/helpers/get-ref-name.d.ts.map +1 -0
- package/dist/components/Content/Schema/helpers/get-ref-name.js +11 -0
- package/dist/components/Content/Schema/helpers/get-schema-type.d.ts +13 -3
- package/dist/components/Content/Schema/helpers/get-schema-type.d.ts.map +1 -1
- package/dist/components/Content/Schema/helpers/get-schema-type.js +34 -13
- package/dist/components/Content/Schema/helpers/is-type-object.d.ts +4 -2
- package/dist/components/Content/Schema/helpers/is-type-object.d.ts.map +1 -1
- package/dist/components/Content/Schema/helpers/merge-all-of-schemas.d.ts +2 -4
- 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 +130 -84
- package/dist/components/Content/Schema/helpers/optimize-value-for-display.d.ts +5 -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 +40 -31
- package/dist/components/Content/Schema/helpers/schema-composition.d.ts +0 -8
- package/dist/components/Content/Schema/helpers/schema-composition.d.ts.map +1 -1
- package/dist/components/Content/Schema/helpers/schema-composition.js +2 -6
- package/dist/components/Content/Schema/helpers/schema-name.d.ts +8 -17
- package/dist/components/Content/Schema/helpers/schema-name.d.ts.map +1 -1
- package/dist/components/Content/Schema/helpers/schema-name.js +24 -33
- package/dist/features/Operation/Operation.vue.d.ts +3 -4
- package/dist/features/Operation/Operation.vue.d.ts.map +1 -1
- package/dist/features/Operation/Operation.vue.js +54 -73
- package/dist/features/Operation/components/ContentTypeSelect.vue.d.ts +10 -11
- package/dist/features/Operation/components/ContentTypeSelect.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/ContentTypeSelect.vue.js +35 -43
- package/dist/features/Operation/components/{ParameterHeaders.vue.d.ts → Header.vue.d.ts} +4 -5
- package/dist/features/Operation/components/Header.vue.d.ts.map +1 -0
- package/dist/features/Operation/components/Header.vue.js +23 -0
- package/dist/features/Operation/components/Header.vue2.js +4 -0
- package/dist/features/Operation/components/Headers.vue.d.ts +8 -0
- package/dist/features/Operation/components/Headers.vue.d.ts.map +1 -0
- package/dist/features/Operation/components/Headers.vue.js +7 -0
- package/dist/features/Operation/components/Headers.vue2.js +61 -0
- package/dist/features/Operation/components/OperationParameters.vue.d.ts +4 -10
- package/dist/features/Operation/components/OperationParameters.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/OperationParameters.vue.js +23 -33
- package/dist/features/Operation/components/OperationResponses.vue.d.ts +3 -6
- package/dist/features/Operation/components/OperationResponses.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/OperationResponses.vue.js +22 -19
- package/dist/features/Operation/components/ParameterList.vue.d.ts +3 -10
- package/dist/features/Operation/components/ParameterList.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/ParameterList.vue.js +35 -5
- package/dist/features/Operation/components/ParameterList.vue2.js +2 -38
- package/dist/features/Operation/components/ParameterListItem.vue.d.ts +4 -10
- package/dist/features/Operation/components/ParameterListItem.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/ParameterListItem.vue.js +2 -2
- package/dist/features/Operation/components/ParameterListItem.vue2.js +77 -74
- package/dist/features/Operation/components/RequestBody.vue.d.ts +3 -8
- package/dist/features/Operation/components/RequestBody.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/RequestBody.vue.js +1 -1
- package/dist/features/Operation/components/RequestBody.vue2.js +75 -82
- package/dist/features/Operation/components/callbacks/Callback.vue.d.ts +0 -4
- package/dist/features/Operation/components/callbacks/Callback.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/callbacks/Callback.vue.js +3 -3
- package/dist/features/Operation/components/callbacks/Callback.vue2.js +35 -36
- package/dist/features/Operation/components/callbacks/Callback.vue3.js +2 -2
- package/dist/features/Operation/components/callbacks/Callbacks.vue.d.ts +0 -2
- package/dist/features/Operation/components/callbacks/Callbacks.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/callbacks/Callbacks.vue.js +13 -15
- package/dist/features/Operation/helpers/combine-params.d.ts +1 -1
- package/dist/features/Operation/helpers/combine-params.d.ts.map +1 -1
- package/dist/features/Operation/helpers/combine-params.js +2 -2
- package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts +1 -9
- package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts.map +1 -1
- package/dist/features/Operation/layouts/ClassicLayout.vue.js +2 -2
- package/dist/features/Operation/layouts/ClassicLayout.vue2.js +75 -82
- package/dist/features/Operation/layouts/ModernLayout.vue.d.ts +2 -10
- package/dist/features/Operation/layouts/ModernLayout.vue.d.ts.map +1 -1
- package/dist/features/Operation/layouts/ModernLayout.vue.js +2 -2
- package/dist/features/Operation/layouts/ModernLayout.vue2.js +96 -103
- package/dist/index.js +1 -1
- package/dist/libs/openapi.d.ts +1 -13
- package/dist/libs/openapi.d.ts.map +1 -1
- package/dist/libs/openapi.js +39 -56
- package/dist/style.css +1 -1
- package/dist/v2/ApiReferenceWorkspace.vue.d.ts +10 -4
- package/dist/v2/ApiReferenceWorkspace.vue.d.ts.map +1 -1
- package/dist/v2/ApiReferenceWorkspace.vue.js +22 -18
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTableInput.vue.d.ts +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTableInput.vue.d.ts.map +1 -1
- package/package.json +14 -14
- package/dist/components/Content/Schema/Schema.preview.d.ts +0 -1078
- package/dist/components/Content/Schema/Schema.preview.d.ts.map +0 -1
- package/dist/components/Content/Schema/SchemaDiscriminator.vue.d.ts +0 -12
- package/dist/components/Content/Schema/SchemaDiscriminator.vue.d.ts.map +0 -1
- package/dist/components/Content/Schema/SchemaDiscriminator.vue.js +0 -49
- package/dist/components/Content/Schema/SchemaDiscriminator.vue2.js +0 -4
- package/dist/components/Content/Schema/SchemaPropertyDescription.vue.d.ts +0 -13
- package/dist/components/Content/Schema/SchemaPropertyDescription.vue.d.ts.map +0 -1
- package/dist/features/Operation/components/ParameterHeaders.vue.d.ts.map +0 -1
- package/dist/features/Operation/components/ParameterHeaders.vue.js +0 -7
- package/dist/features/Operation/components/ParameterHeaders.vue2.js +0 -64
- package/dist/features/Operation/components/ParameterList.vue3.js +0 -4
- package/dist/features/Operation/hooks/useResponses.d.ts +0 -17
- package/dist/features/Operation/hooks/useResponses.d.ts.map +0 -1
- package/dist/features/Operation/hooks/useResponses.js +0 -19
- package/dist/hooks/useDiscriminator.d.ts +0 -53
- package/dist/hooks/useDiscriminator.d.ts.map +0 -1
- package/dist/hooks/useDiscriminator.js +0 -149
- package/dist/hooks/useOperationDiscriminator.d.ts +0 -8
- package/dist/hooks/useOperationDiscriminator.d.ts.map +0 -1
- package/dist/hooks/useOperationDiscriminator.js +0 -57
- /package/dist/features/Operation/components/{ParameterHeaders.vue3.js → Headers.vue3.js} +0 -0
|
@@ -1,26 +1,27 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { ScalarErrorBoundary as
|
|
3
|
-
import { ScalarIconPlay as
|
|
4
|
-
import { isOperationDeprecated as
|
|
5
|
-
import { useClipboard as
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
|
|
1
|
+
import { defineComponent as v, computed as g, createBlock as r, openBlock as i, unref as o, createSlots as S, withCtx as s, createElementVNode as a, createCommentVNode as n, createElementBlock as C, createVNode as t, withModifiers as B, toDisplayString as c, normalizeClass as w, createTextVNode as h } from "vue";
|
|
2
|
+
import { ScalarErrorBoundary as O, ScalarIconButton as $, ScalarMarkdown as R } from "@scalar/components";
|
|
3
|
+
import { ScalarIconPlay as q, ScalarIconCopy as I, ScalarIconWebhooksLogo as T } from "@scalar/icons";
|
|
4
|
+
import { isOperationDeprecated as E, getOperationStability as u, getOperationStabilityColor as L } from "@scalar/oas-utils/helpers";
|
|
5
|
+
import { useClipboard as W } from "@scalar/use-hooks/useClipboard";
|
|
6
|
+
import { getResolvedRef as _ } from "@scalar/workspace-store/helpers/get-resolved-ref";
|
|
7
|
+
import z from "../../../components/OperationPath.vue.js";
|
|
8
|
+
import D from "../components/callbacks/Callbacks.vue.js";
|
|
9
|
+
import N from "../components/OperationParameters.vue.js";
|
|
10
|
+
import P from "../components/OperationResponses.vue.js";
|
|
11
|
+
import V from "../../../components/Section/SectionAccordion.vue.js";
|
|
12
|
+
import A from "../../example-responses/ExampleResponses.vue.js";
|
|
13
|
+
import M from "../../../components/LinkList/LinkList.vue.js";
|
|
14
|
+
import j from "../../external-docs/ExternalDocs.vue.js";
|
|
15
|
+
import U from "../../../v2/blocks/scalar-request-example-block/components/RequestExample.vue.js";
|
|
16
|
+
import f from "../../x-badges/XBadges.vue.js";
|
|
17
|
+
import F from "../../test-request-button/TestRequestButton.vue.js";
|
|
18
|
+
import G from "../../../components/HttpMethod/HttpMethod.vue.js";
|
|
19
|
+
import H from "../../../components/Anchor/Anchor.vue.js";
|
|
20
|
+
import y from "../../../components/Badge/Badge.vue.js";
|
|
21
|
+
const J = { class: "operation-title" }, K = { class: "operation-details" }, Q = { class: "endpoint-label" }, X = { class: "endpoint-label-path" }, Y = { class: "endpoint-label-name" }, Z = { class: "endpoint-content" }, x = { class: "operation-details-card" }, ee = { class: "operation-details-card-item" }, oe = { class: "operation-details-card-item" }, te = {
|
|
21
22
|
key: 0,
|
|
22
23
|
class: "operation-details-card-item"
|
|
23
|
-
}, we = /* @__PURE__ */
|
|
24
|
+
}, we = /* @__PURE__ */ v({
|
|
24
25
|
__name: "ClassicLayout",
|
|
25
26
|
props: {
|
|
26
27
|
id: {},
|
|
@@ -29,65 +30,60 @@ const Q = { class: "operation-title" }, X = { class: "operation-details" }, Y =
|
|
|
29
30
|
method: {},
|
|
30
31
|
config: {},
|
|
31
32
|
operation: {},
|
|
32
|
-
oldOperation: {},
|
|
33
33
|
isWebhook: { type: Boolean },
|
|
34
34
|
server: {},
|
|
35
35
|
securitySchemes: {},
|
|
36
|
-
schemas: {},
|
|
37
36
|
store: {}
|
|
38
37
|
},
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
v("update:modelValue", e);
|
|
43
|
-
};
|
|
44
|
-
return (e, l) => (i(), r(o(M), {
|
|
38
|
+
setup(d) {
|
|
39
|
+
const b = g(() => d.operation.summary || d.path || ""), { copyToClipboard: k } = W();
|
|
40
|
+
return (e, l) => (i(), r(o(V), {
|
|
45
41
|
id: e.id,
|
|
46
42
|
class: "reference-endpoint",
|
|
47
43
|
transparent: ""
|
|
48
|
-
},
|
|
44
|
+
}, S({
|
|
49
45
|
title: s(() => [
|
|
50
|
-
a("div",
|
|
51
|
-
a("div",
|
|
52
|
-
t(o(
|
|
46
|
+
a("div", J, [
|
|
47
|
+
a("div", K, [
|
|
48
|
+
t(o(G), {
|
|
53
49
|
class: "endpoint-type",
|
|
54
50
|
method: e.method,
|
|
55
51
|
short: ""
|
|
56
52
|
}, null, 8, ["method"]),
|
|
57
|
-
t(o(
|
|
53
|
+
t(o(H), {
|
|
58
54
|
id: e.id,
|
|
59
55
|
class: "endpoint-anchor"
|
|
60
56
|
}, {
|
|
61
57
|
default: s(() => [
|
|
62
|
-
a("h3",
|
|
63
|
-
a("div",
|
|
64
|
-
t(
|
|
65
|
-
deprecated: o(
|
|
58
|
+
a("h3", Q, [
|
|
59
|
+
a("div", X, [
|
|
60
|
+
t(z, {
|
|
61
|
+
deprecated: o(E)(e.operation),
|
|
66
62
|
path: e.path
|
|
67
63
|
}, null, 8, ["deprecated", "path"])
|
|
68
64
|
]),
|
|
69
|
-
a("div",
|
|
70
|
-
o(
|
|
65
|
+
a("div", Y, c(b.value), 1),
|
|
66
|
+
o(u)(e.operation) ? (i(), r(o(y), {
|
|
71
67
|
key: 0,
|
|
72
|
-
class:
|
|
68
|
+
class: w(["capitalize", o(L)(e.operation)])
|
|
73
69
|
}, {
|
|
74
70
|
default: s(() => [
|
|
75
|
-
|
|
71
|
+
h(c(o(u)(e.operation)), 1)
|
|
76
72
|
]),
|
|
77
73
|
_: 1
|
|
78
74
|
}, 8, ["class"])) : n("", !0),
|
|
79
|
-
e.isWebhook ? (i(), r(o(
|
|
75
|
+
e.isWebhook ? (i(), r(o(y), {
|
|
80
76
|
key: 1,
|
|
81
77
|
class: "font-code text-green flex w-fit items-center justify-center gap-1"
|
|
82
78
|
}, {
|
|
83
79
|
default: s(() => [
|
|
84
|
-
t(o(
|
|
85
|
-
l[1] || (l[1] =
|
|
80
|
+
t(o(T), { weight: "bold" }),
|
|
81
|
+
l[1] || (l[1] = h("Webhook "))
|
|
86
82
|
]),
|
|
87
83
|
_: 1,
|
|
88
84
|
__: [1]
|
|
89
85
|
})) : n("", !0),
|
|
90
|
-
t(o(
|
|
86
|
+
t(o(f), {
|
|
91
87
|
badges: e.operation["x-badges"],
|
|
92
88
|
position: "before"
|
|
93
89
|
}, null, 8, ["badges"])
|
|
@@ -99,88 +95,85 @@ const Q = { class: "operation-title" }, X = { class: "operation-details" }, Y =
|
|
|
99
95
|
])
|
|
100
96
|
]),
|
|
101
97
|
actions: s(({ active: p }) => {
|
|
102
|
-
var
|
|
98
|
+
var m;
|
|
103
99
|
return [
|
|
104
|
-
t(o(
|
|
100
|
+
t(o(f), {
|
|
105
101
|
badges: e.operation["x-badges"],
|
|
106
102
|
position: "after"
|
|
107
103
|
}, null, 8, ["badges"]),
|
|
108
|
-
p && !e.isWebhook ? (i(), r(o(
|
|
104
|
+
p && !e.isWebhook ? (i(), r(o(F), {
|
|
109
105
|
key: 0,
|
|
110
106
|
method: e.method,
|
|
111
107
|
path: e.path
|
|
112
|
-
}, null, 8, ["method", "path"])) : (
|
|
108
|
+
}, null, 8, ["method", "path"])) : (m = e.config) != null && m.hideTestRequestButton ? n("", !0) : (i(), r(o(q), {
|
|
113
109
|
key: 1,
|
|
114
110
|
class: "endpoint-try-hint size-4.5"
|
|
115
111
|
})),
|
|
116
|
-
t(o(
|
|
112
|
+
t(o($), {
|
|
117
113
|
class: "endpoint-copy p-0.5",
|
|
118
|
-
icon: o(
|
|
114
|
+
icon: o(I),
|
|
119
115
|
label: "Copy endpoint URL",
|
|
120
116
|
size: "xs",
|
|
121
117
|
variant: "ghost",
|
|
122
|
-
onClick: l[0] || (l[0] =
|
|
118
|
+
onClick: l[0] || (l[0] = B((ae) => o(k)(e.path), ["stop"]))
|
|
123
119
|
}, null, 8, ["icon"])
|
|
124
120
|
];
|
|
125
121
|
}),
|
|
126
122
|
default: s(() => {
|
|
127
123
|
var p;
|
|
128
124
|
return [
|
|
129
|
-
a("div",
|
|
130
|
-
a("div",
|
|
131
|
-
a("div",
|
|
132
|
-
t(
|
|
133
|
-
parameters:
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
125
|
+
a("div", Z, [
|
|
126
|
+
a("div", x, [
|
|
127
|
+
a("div", ee, [
|
|
128
|
+
t(N, {
|
|
129
|
+
parameters: (
|
|
130
|
+
// These have been resolved in the Operation.vue component
|
|
131
|
+
e.operation.parameters
|
|
132
|
+
),
|
|
133
|
+
requestBody: o(_)(e.operation.requestBody)
|
|
134
|
+
}, null, 8, ["parameters", "requestBody"])
|
|
138
135
|
]),
|
|
139
|
-
a("div",
|
|
140
|
-
t(
|
|
136
|
+
a("div", oe, [
|
|
137
|
+
t(P, {
|
|
141
138
|
collapsableItems: !1,
|
|
142
|
-
responses: e.
|
|
143
|
-
|
|
144
|
-
}, null, 8, ["responses", "schemas"])
|
|
139
|
+
responses: e.operation.responses
|
|
140
|
+
}, null, 8, ["responses"])
|
|
145
141
|
]),
|
|
146
|
-
(p = e.operation) != null && p.callbacks ? (i(),
|
|
147
|
-
t(
|
|
142
|
+
(p = e.operation) != null && p.callbacks ? (i(), C("div", te, [
|
|
143
|
+
t(D, {
|
|
148
144
|
callbacks: e.operation.callbacks,
|
|
149
145
|
method: e.method,
|
|
150
|
-
path: e.path
|
|
151
|
-
|
|
152
|
-
}, null, 8, ["callbacks", "method", "path", "schemas"])
|
|
146
|
+
path: e.path
|
|
147
|
+
}, null, 8, ["callbacks", "method", "path"])
|
|
153
148
|
])) : n("", !0)
|
|
154
149
|
]),
|
|
155
|
-
e.operation.responses ? (i(), r(o(
|
|
150
|
+
e.operation.responses ? (i(), r(o(A), {
|
|
156
151
|
key: 0,
|
|
157
152
|
class: "operation-example-card",
|
|
158
153
|
responses: e.operation.responses
|
|
159
154
|
}, null, 8, ["responses"])) : n("", !0),
|
|
160
155
|
a("div", null, [
|
|
161
|
-
e.operation.externalDocs ? (i(), r(o(
|
|
156
|
+
e.operation.externalDocs ? (i(), r(o(M), { key: 0 }, {
|
|
162
157
|
default: s(() => [
|
|
163
|
-
t(o(
|
|
158
|
+
t(o(j), {
|
|
164
159
|
value: e.operation.externalDocs
|
|
165
160
|
}, null, 8, ["value"])
|
|
166
161
|
]),
|
|
167
162
|
_: 1
|
|
168
163
|
})) : n("", !0),
|
|
169
|
-
t(o(
|
|
164
|
+
t(o(O), null, {
|
|
170
165
|
default: s(() => [
|
|
171
|
-
t(o(
|
|
166
|
+
t(o(U), {
|
|
172
167
|
class: "operation-example-card",
|
|
173
168
|
clientOptions: e.clientOptions,
|
|
174
169
|
fallback: "",
|
|
175
|
-
isWebhook: e.isWebhook,
|
|
176
170
|
method: e.method,
|
|
177
171
|
operation: e.operation,
|
|
178
172
|
path: e.path,
|
|
179
173
|
securitySchemes: e.securitySchemes,
|
|
180
174
|
selectedClient: e.store.workspace["x-scalar-default-client"],
|
|
181
|
-
selectedServer: e.server
|
|
182
|
-
|
|
183
|
-
}, null, 8, ["clientOptions", "isWebhook", "method", "operation", "path", "securitySchemes", "selectedClient", "selectedServer"])
|
|
175
|
+
selectedServer: e.server
|
|
176
|
+
}, null, 8, ["clientOptions", "method", "operation", "path", "securitySchemes", "selectedClient", "selectedServer"])
|
|
184
177
|
]),
|
|
185
178
|
_: 1
|
|
186
179
|
})
|
|
@@ -193,7 +186,7 @@ const Q = { class: "operation-title" }, X = { class: "operation-details" }, Y =
|
|
|
193
186
|
e.operation.description ? {
|
|
194
187
|
name: "description",
|
|
195
188
|
fn: s(() => [
|
|
196
|
-
t(o(
|
|
189
|
+
t(o(R), {
|
|
197
190
|
anchorPrefix: e.id,
|
|
198
191
|
transformType: "heading",
|
|
199
192
|
value: e.operation.description,
|
|
@@ -1,28 +1,20 @@
|
|
|
1
1
|
import type { HttpMethod as HttpMethodType } from '@scalar/helpers/http/http-methods';
|
|
2
|
-
import type { OpenAPIV3_1 } from '@scalar/openapi-types';
|
|
3
2
|
import type { ApiReferenceConfiguration } from '@scalar/types';
|
|
4
3
|
import type { WorkspaceStore } from '@scalar/workspace-store/client';
|
|
5
4
|
import type { OperationObject, SecuritySchemeObject, ServerObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
|
|
6
|
-
import type { Schemas } from '../../../features/Operation/types/schemas';
|
|
7
5
|
import type { ClientOptionGroup } from '../../../v2/blocks/scalar-request-example-block/types';
|
|
8
6
|
type __VLS_Props = {
|
|
9
7
|
id: string;
|
|
10
8
|
path: string;
|
|
11
9
|
clientOptions: ClientOptionGroup[];
|
|
12
|
-
method: HttpMethodType;
|
|
13
10
|
config: ApiReferenceConfiguration;
|
|
11
|
+
method: HttpMethodType;
|
|
14
12
|
operation: OperationObject;
|
|
15
|
-
oldOperation: OpenAPIV3_1.OperationObject;
|
|
16
13
|
isWebhook: boolean;
|
|
17
14
|
securitySchemes: SecuritySchemeObject[];
|
|
18
15
|
server: ServerObject | undefined;
|
|
19
|
-
schemas?: Schemas;
|
|
20
16
|
store: WorkspaceStore;
|
|
21
17
|
};
|
|
22
|
-
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
23
|
-
"update:modelValue": (value: string) => any;
|
|
24
|
-
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
25
|
-
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
26
|
-
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
18
|
+
declare const _default: 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>;
|
|
27
19
|
export default _default;
|
|
28
20
|
//# sourceMappingURL=ModernLayout.vue.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ModernLayout.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/layouts/ModernLayout.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ModernLayout.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/layouts/ModernLayout.vue"],"names":[],"mappings":"AAwNA,OAAO,KAAK,EAAE,UAAU,IAAI,cAAc,EAAE,MAAM,mCAAmC,CAAA;AAOrF,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,eAAe,CAAA;AAC9D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;AAEpE,OAAO,KAAK,EACV,eAAe,EAEf,oBAAoB,EACpB,YAAY,EACb,MAAM,8DAA8D,CAAA;AAuBrE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gDAAgD,CAAA;AAEvF,KAAK,WAAW,GAAG;IACjB,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,aAAa,EAAE,iBAAiB,EAAE,CAAA;IAClC,MAAM,EAAE,yBAAyB,CAAA;IACjC,MAAM,EAAE,cAAc,CAAA;IACtB,SAAS,EAAE,eAAe,CAAA;IAE1B,SAAS,EAAE,OAAO,CAAA;IAClB,eAAe,EAAE,oBAAoB,EAAE,CAAA;IACvC,MAAM,EAAE,YAAY,GAAG,SAAS,CAAA;IAChC,KAAK,EAAE,cAAc,CAAA;CACtB,CAAC;;AAsbF,wBAMG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./ModernLayout.vue2.js";
|
|
2
2
|
import "./ModernLayout.vue3.js";
|
|
3
3
|
import t from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const f = /* @__PURE__ */ t(o, [["__scopeId", "data-v-4e34f7b6"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
f as default
|
|
7
7
|
};
|
|
@@ -1,104 +1,100 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { ScalarMarkdown as
|
|
3
|
-
import { ScalarIconWebhooksLogo as
|
|
4
|
-
import { getOperationStability as
|
|
1
|
+
import { defineComponent as S, computed as C, useId as w, createBlock as r, openBlock as i, unref as o, withCtx as a, createVNode as t, createElementVNode as l, createCommentVNode as s, normalizeClass as h, createTextVNode as n, toDisplayString as b, createSlots as B } from "vue";
|
|
2
|
+
import { ScalarMarkdown as O, ScalarErrorBoundary as p } from "@scalar/components";
|
|
3
|
+
import { ScalarIconWebhooksLogo as I } from "@scalar/icons";
|
|
4
|
+
import { getOperationStability as g, getOperationStabilityColor as R, isOperationDeprecated as $ } from "@scalar/oas-utils/helpers";
|
|
5
|
+
import { getResolvedRef as q } from "@scalar/workspace-store/helpers/get-resolved-ref";
|
|
5
6
|
import L from "../../../components/OperationPath.vue.js";
|
|
6
7
|
import T from "../components/callbacks/Callbacks.vue.js";
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import
|
|
8
|
+
import W from "../components/OperationParameters.vue.js";
|
|
9
|
+
import _ from "../components/OperationResponses.vue.js";
|
|
10
|
+
import D from "../../../components/Section/Section.vue.js";
|
|
11
|
+
import E from "../../../components/Section/SectionContent.vue.js";
|
|
12
|
+
import y from "../../../components/Badge/Badge.vue.js";
|
|
13
|
+
import k from "../../x-badges/XBadges.vue.js";
|
|
14
|
+
import N from "../../../components/Section/SectionHeader.vue.js";
|
|
15
|
+
import V from "../../../components/Anchor/Anchor.vue.js";
|
|
16
|
+
import P from "../../../components/Section/SectionHeaderTag.vue.js";
|
|
17
|
+
import j from "../../../components/Section/SectionColumns.vue.js";
|
|
17
18
|
import v from "../../../components/Section/SectionColumn.vue.js";
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
import
|
|
21
|
-
import
|
|
22
|
-
import
|
|
23
|
-
const
|
|
19
|
+
import z from "../../../components/LinkList/LinkList.vue.js";
|
|
20
|
+
import A from "../../external-docs/ExternalDocs.vue.js";
|
|
21
|
+
import H from "../../../v2/blocks/scalar-request-example-block/components/RequestExample.vue.js";
|
|
22
|
+
import M from "../../test-request-button/TestRequestButton.vue.js";
|
|
23
|
+
import F from "../../example-responses/ExampleResponses.vue.js";
|
|
24
|
+
const G = { class: "flex flex-row justify-between gap-1" }, J = { class: "flex gap-1" }, K = { class: "flex gap-1" }, Q = { class: "operation-details" }, U = { class: "examples" }, ke = /* @__PURE__ */ S({
|
|
24
25
|
__name: "ModernLayout",
|
|
25
26
|
props: {
|
|
26
27
|
id: {},
|
|
27
28
|
path: {},
|
|
28
29
|
clientOptions: {},
|
|
29
|
-
method: {},
|
|
30
30
|
config: {},
|
|
31
|
+
method: {},
|
|
31
32
|
operation: {},
|
|
32
|
-
oldOperation: {},
|
|
33
33
|
isWebhook: { type: Boolean },
|
|
34
34
|
securitySchemes: {},
|
|
35
35
|
server: {},
|
|
36
|
-
schemas: {},
|
|
37
36
|
store: {}
|
|
38
37
|
},
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
O("update:modelValue", e);
|
|
43
|
-
};
|
|
44
|
-
return (e, f) => (s(), r(o(R), {
|
|
38
|
+
setup(d) {
|
|
39
|
+
const m = C(() => d.operation.summary || d.path || ""), u = w();
|
|
40
|
+
return (e, f) => (i(), r(o(D), {
|
|
45
41
|
id: e.id,
|
|
46
42
|
"aria-labelledby": o(u),
|
|
47
43
|
label: m.value,
|
|
48
44
|
tabindex: "-1"
|
|
49
45
|
}, {
|
|
50
|
-
default:
|
|
51
|
-
|
|
46
|
+
default: a(() => [
|
|
47
|
+
t(o(E), {
|
|
52
48
|
loading: e.config.isLoading
|
|
53
49
|
}, {
|
|
54
|
-
default:
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
o(
|
|
50
|
+
default: a(() => [
|
|
51
|
+
l("div", G, [
|
|
52
|
+
l("div", J, [
|
|
53
|
+
o(g)(e.operation) ? (i(), r(o(y), {
|
|
58
54
|
key: 0,
|
|
59
|
-
class:
|
|
55
|
+
class: h(["capitalize", o(R)(e.operation)])
|
|
60
56
|
}, {
|
|
61
|
-
default:
|
|
62
|
-
n(
|
|
57
|
+
default: a(() => [
|
|
58
|
+
n(b(o(g)(e.operation)), 1)
|
|
63
59
|
]),
|
|
64
60
|
_: 1
|
|
65
|
-
}, 8, ["class"])) :
|
|
66
|
-
e.isWebhook ? (
|
|
61
|
+
}, 8, ["class"])) : s("", !0),
|
|
62
|
+
e.isWebhook ? (i(), r(o(y), {
|
|
67
63
|
key: 1,
|
|
68
64
|
class: "font-code text-green flex w-fit items-center justify-center gap-1"
|
|
69
65
|
}, {
|
|
70
|
-
default:
|
|
71
|
-
|
|
66
|
+
default: a(() => [
|
|
67
|
+
t(o(I), { weight: "bold" }),
|
|
72
68
|
f[0] || (f[0] = n("Webhook "))
|
|
73
69
|
]),
|
|
74
70
|
_: 1,
|
|
75
71
|
__: [0]
|
|
76
|
-
})) :
|
|
77
|
-
|
|
72
|
+
})) : s("", !0),
|
|
73
|
+
t(o(k), {
|
|
78
74
|
badges: e.operation["x-badges"],
|
|
79
75
|
position: "before"
|
|
80
76
|
}, null, 8, ["badges"])
|
|
81
77
|
]),
|
|
82
|
-
|
|
83
|
-
|
|
78
|
+
l("div", K, [
|
|
79
|
+
t(o(k), {
|
|
84
80
|
badges: e.operation["x-badges"],
|
|
85
81
|
position: "after"
|
|
86
82
|
}, null, 8, ["badges"])
|
|
87
83
|
])
|
|
88
84
|
]),
|
|
89
|
-
|
|
90
|
-
class:
|
|
85
|
+
l("div", {
|
|
86
|
+
class: h(o($)(e.operation) ? "deprecated" : "")
|
|
91
87
|
}, [
|
|
92
|
-
|
|
93
|
-
default:
|
|
94
|
-
|
|
95
|
-
default:
|
|
96
|
-
|
|
88
|
+
t(o(N), null, {
|
|
89
|
+
default: a(() => [
|
|
90
|
+
t(o(V), { id: e.id }, {
|
|
91
|
+
default: a(() => [
|
|
92
|
+
t(o(P), {
|
|
97
93
|
id: o(u),
|
|
98
94
|
level: 3
|
|
99
95
|
}, {
|
|
100
|
-
default:
|
|
101
|
-
n(
|
|
96
|
+
default: a(() => [
|
|
97
|
+
n(b(m.value), 1)
|
|
102
98
|
]),
|
|
103
99
|
_: 1
|
|
104
100
|
}, 8, ["id"])
|
|
@@ -109,41 +105,40 @@ const J = { class: "flex flex-row justify-between gap-1" }, K = { class: "flex g
|
|
|
109
105
|
_: 1
|
|
110
106
|
})
|
|
111
107
|
], 2),
|
|
112
|
-
|
|
113
|
-
default:
|
|
114
|
-
|
|
115
|
-
default:
|
|
116
|
-
|
|
117
|
-
|
|
108
|
+
t(o(j), null, {
|
|
109
|
+
default: a(() => [
|
|
110
|
+
t(o(v), null, {
|
|
111
|
+
default: a(() => [
|
|
112
|
+
l("div", Q, [
|
|
113
|
+
t(o(O), {
|
|
118
114
|
anchorPrefix: e.id,
|
|
119
115
|
transformType: "heading",
|
|
120
116
|
value: e.operation.description,
|
|
121
117
|
withAnchors: "",
|
|
122
118
|
withImages: ""
|
|
123
119
|
}, null, 8, ["anchorPrefix", "value"]),
|
|
124
|
-
|
|
120
|
+
t(W, {
|
|
125
121
|
breadcrumb: [e.id],
|
|
126
|
-
parameters:
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
122
|
+
parameters: (
|
|
123
|
+
// These have been resolved in the Operation.vue component
|
|
124
|
+
e.operation.parameters
|
|
125
|
+
),
|
|
126
|
+
requestBody: o(q)(e.operation.requestBody)
|
|
127
|
+
}, null, 8, ["breadcrumb", "parameters", "requestBody"]),
|
|
128
|
+
t(_, {
|
|
132
129
|
breadcrumb: [e.id],
|
|
133
130
|
collapsableItems: !e.config.expandAllResponses,
|
|
134
|
-
responses: e.
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
e.operation.callbacks ? (s(), r(T, {
|
|
131
|
+
responses: e.operation.responses
|
|
132
|
+
}, null, 8, ["breadcrumb", "collapsableItems", "responses"]),
|
|
133
|
+
t(o(p), null, {
|
|
134
|
+
default: a(() => [
|
|
135
|
+
e.operation.callbacks ? (i(), r(T, {
|
|
140
136
|
key: 0,
|
|
141
137
|
callbacks: e.operation.callbacks,
|
|
142
138
|
class: "mt-6",
|
|
143
139
|
method: e.method,
|
|
144
|
-
path: e.path
|
|
145
|
-
|
|
146
|
-
}, null, 8, ["callbacks", "method", "path", "schemas"])) : l("", !0)
|
|
140
|
+
path: e.path
|
|
141
|
+
}, null, 8, ["callbacks", "method", "path"])) : s("", !0)
|
|
147
142
|
]),
|
|
148
143
|
_: 1
|
|
149
144
|
})
|
|
@@ -151,37 +146,35 @@ const J = { class: "flex flex-row justify-between gap-1" }, K = { class: "flex g
|
|
|
151
146
|
]),
|
|
152
147
|
_: 1
|
|
153
148
|
}),
|
|
154
|
-
|
|
155
|
-
default:
|
|
156
|
-
|
|
157
|
-
e.operation.externalDocs ? (
|
|
158
|
-
default:
|
|
159
|
-
|
|
149
|
+
t(o(v), null, {
|
|
150
|
+
default: a(() => [
|
|
151
|
+
l("div", U, [
|
|
152
|
+
e.operation.externalDocs ? (i(), r(o(z), { key: 0 }, {
|
|
153
|
+
default: a(() => [
|
|
154
|
+
t(o(A), {
|
|
160
155
|
value: e.operation.externalDocs
|
|
161
156
|
}, null, 8, ["value"])
|
|
162
157
|
]),
|
|
163
158
|
_: 1
|
|
164
|
-
})) :
|
|
165
|
-
|
|
166
|
-
default:
|
|
167
|
-
|
|
159
|
+
})) : s("", !0),
|
|
160
|
+
t(o(p), null, {
|
|
161
|
+
default: a(() => [
|
|
162
|
+
t(o(H), {
|
|
168
163
|
clientOptions: e.clientOptions,
|
|
169
164
|
fallback: "",
|
|
170
|
-
isWebhook: e.isWebhook,
|
|
171
165
|
method: e.method,
|
|
172
166
|
operation: e.operation,
|
|
173
167
|
path: e.path,
|
|
174
168
|
securitySchemes: e.securitySchemes,
|
|
175
169
|
selectedClient: e.store.workspace["x-scalar-default-client"],
|
|
176
|
-
selectedServer: e.server
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
var h;
|
|
170
|
+
selectedServer: e.server
|
|
171
|
+
}, B({
|
|
172
|
+
header: a(() => {
|
|
173
|
+
var c;
|
|
181
174
|
return [
|
|
182
|
-
|
|
175
|
+
t(L, {
|
|
183
176
|
class: "font-code text-c-2 [&_em]:text-c-1 [&_em]:not-italic",
|
|
184
|
-
deprecated: (
|
|
177
|
+
deprecated: (c = e.operation) == null ? void 0 : c.deprecated,
|
|
185
178
|
path: e.path
|
|
186
179
|
}, null, 8, ["deprecated", "path"])
|
|
187
180
|
];
|
|
@@ -190,25 +183,25 @@ const J = { class: "flex flex-row justify-between gap-1" }, K = { class: "flex g
|
|
|
190
183
|
}, [
|
|
191
184
|
e.isWebhook ? void 0 : {
|
|
192
185
|
name: "footer",
|
|
193
|
-
fn:
|
|
194
|
-
|
|
186
|
+
fn: a(() => [
|
|
187
|
+
t(o(M), {
|
|
195
188
|
method: e.method,
|
|
196
189
|
path: e.path
|
|
197
190
|
}, null, 8, ["method", "path"])
|
|
198
191
|
]),
|
|
199
192
|
key: "0"
|
|
200
193
|
}
|
|
201
|
-
]), 1032, ["clientOptions", "
|
|
194
|
+
]), 1032, ["clientOptions", "method", "operation", "path", "securitySchemes", "selectedClient", "selectedServer"])
|
|
202
195
|
]),
|
|
203
196
|
_: 1
|
|
204
197
|
}),
|
|
205
|
-
|
|
206
|
-
default:
|
|
207
|
-
e.operation.responses ? (
|
|
198
|
+
t(o(p), null, {
|
|
199
|
+
default: a(() => [
|
|
200
|
+
e.operation.responses ? (i(), r(o(F), {
|
|
208
201
|
key: 0,
|
|
209
202
|
responses: e.operation.responses,
|
|
210
203
|
style: { "margin-top": "12px" }
|
|
211
|
-
}, null, 8, ["responses"])) :
|
|
204
|
+
}, null, 8, ["responses"])) : s("", !0)
|
|
212
205
|
]),
|
|
213
206
|
_: 1
|
|
214
207
|
})
|
|
@@ -228,5 +221,5 @@ const J = { class: "flex flex-row justify-between gap-1" }, K = { class: "flex g
|
|
|
228
221
|
}
|
|
229
222
|
});
|
|
230
223
|
export {
|
|
231
|
-
|
|
224
|
+
ke as default
|
|
232
225
|
};
|