@scalar/api-reference 1.43.5 → 1.43.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +59 -0
- package/dist/blocks/scalar-client-selector-block/components/ClientDropdown.vue2.js +7 -7
- package/dist/blocks/scalar-client-selector-block/components/ClientSelector.vue2.js +5 -5
- package/dist/blocks/scalar-info-block/components/DownloadLink.vue2.js +5 -5
- package/dist/blocks/scalar-info-block/components/InfoBlock.vue.js +11 -11
- package/dist/blocks/scalar-info-block/components/InfoDescription.vue2.js +2 -2
- package/dist/blocks/scalar-info-block/components/InfoLinks.vue.js +7 -7
- package/dist/blocks/scalar-info-block/components/InfoMarkdownSection.vue.js +2 -2
- package/dist/blocks/scalar-info-block/components/IntroductionCard.vue2.js +1 -1
- package/dist/blocks/scalar-info-block/components/IntroductionLayout.vue2.js +16 -16
- package/dist/blocks/scalar-info-block/components/OpenApiVersion.vue.js +2 -2
- package/dist/blocks/scalar-server-selector-block/components/Selector.vue.js +1 -1
- package/dist/blocks/scalar-server-selector-block/components/ServerSelector.vue.js +7 -7
- package/dist/browser/standalone.js +18437 -18030
- package/dist/browser/webpack-stats.json +1 -1
- package/dist/components/Anchor/WithBreadcrumb.vue.js +3 -3
- package/dist/components/ApiReference.vue.d.ts.map +1 -1
- package/dist/components/ApiReference.vue.js +1 -1
- package/dist/components/ApiReference.vue2.js +16 -11
- package/dist/components/Content/Auth/Auth.vue.js +7 -7
- package/dist/components/Content/Content.vue.js +28 -28
- package/dist/components/Content/Models/Model.vue.js +14 -14
- package/dist/components/Content/Models/ModelTag.vue.js +8 -8
- package/dist/components/Content/Models/components/ClassicLayout.vue2.js +15 -15
- package/dist/components/Content/Models/components/ModernLayout.vue.js +11 -11
- package/dist/components/Content/Operations/TraversedEntry.vue.js +51 -51
- package/dist/components/Content/Schema/Schema.vue2.js +40 -40
- package/dist/components/Content/Schema/SchemaComposition.vue.js +17 -17
- package/dist/components/Content/Schema/SchemaEnumPropertyItem.vue2.js +3 -3
- package/dist/components/Content/Schema/SchemaHeading.vue2.js +7 -7
- package/dist/components/Content/Schema/SchemaObjectProperties.vue.js +31 -31
- package/dist/components/Content/Schema/SchemaProperty.vue2.js +33 -33
- package/dist/components/Content/Schema/SchemaPropertyDetail.vue2.js +2 -2
- package/dist/components/Content/Schema/SchemaPropertyExamples.vue2.js +6 -6
- package/dist/components/Content/Tags/Tag.vue.js +11 -11
- package/dist/components/Content/Tags/components/ClassicLayout.vue2.js +6 -6
- package/dist/components/Content/Tags/components/ModernLayout.vue2.js +10 -10
- package/dist/components/Content/Tags/components/TagSection.vue.js +14 -14
- package/dist/components/GettingStarted.vue2.js +1 -1
- package/dist/components/HttpMethod/HttpMethod.vue.js +3 -3
- package/dist/components/IntersectionObserver.vue.js +2 -2
- package/dist/components/LoadingSkeleton.vue2.js +2 -2
- package/dist/components/MobileHeader.vue.js +6 -6
- package/dist/components/OperationPath.vue2.js +1 -1
- package/dist/components/OperationsList/OperationsList.vue2.js +5 -5
- package/dist/components/OperationsList/OperationsListItem.vue2.js +8 -8
- package/dist/components/RenderPlugins/RenderPlugins.vue.js +2 -2
- package/dist/components/Section/CompactSection.vue2.js +9 -9
- package/dist/components/Section/SectionAccordion.vue2.js +5 -5
- package/dist/components/Section/SectionContainer.vue2.js +1 -1
- package/dist/components/Section/SectionContainerAccordion.vue2.js +3 -3
- package/dist/components/Section/SectionContent.vue2.js +1 -1
- package/dist/components/Section/SectionHeader.vue2.js +2 -2
- package/dist/components/Section/SectionHeaderTag.vue2.js +1 -1
- package/dist/features/Operation/Operation.vue.js +18 -18
- package/dist/features/Operation/components/Header.vue.js +8 -8
- package/dist/features/Operation/components/Headers.vue2.js +5 -5
- package/dist/features/Operation/components/OperationParameters.vue.js +17 -17
- package/dist/features/Operation/components/OperationResponses.vue.js +6 -6
- package/dist/features/Operation/components/ParameterList.vue.js +6 -6
- package/dist/features/Operation/components/ParameterListItem.vue2.js +16 -16
- package/dist/features/Operation/components/RequestBody.vue2.js +17 -17
- package/dist/features/Operation/components/callbacks/Callback.vue2.js +10 -10
- package/dist/features/Operation/components/callbacks/Callbacks.vue.js +3 -3
- package/dist/features/Operation/layouts/ClassicLayout.vue2.js +49 -49
- package/dist/features/Operation/layouts/ModernLayout.vue2.js +50 -50
- package/dist/features/Search/components/SearchButton.vue.js +5 -5
- package/dist/features/Search/components/SearchModal.vue2.js +1 -1
- package/dist/features/Search/components/SearchResult.vue.js +14 -14
- package/dist/features/example-responses/ExampleResponse.vue2.js +3 -3
- package/dist/features/external-docs/ExternalDocs.vue.js +3 -3
- package/dist/features/info-object/Contact.vue.js +6 -6
- package/dist/features/info-object/License.vue.js +4 -4
- package/dist/features/info-object/TermsOfService.vue.js +2 -2
- package/dist/features/multiple-documents/DocumentSelector.vue.js +1 -1
- package/dist/features/specification-extension/SpecificationExtension.vue2.js +3 -3
- package/dist/features/test-request-button/TestRequestButton.vue2.js +2 -2
- package/dist/features/toolbar/ApiReferenceToolbar.vue.js +4 -4
- package/dist/features/toolbar/ApiReferenceToolbarConfig.vue.js +1 -1
- package/dist/features/toolbar/ApiReferenceToolbarSdks.vue.js +1 -1
- package/dist/features/toolbar/ApiReferenceToolbarShare.vue.js +2 -2
- package/dist/features/toolbar/ApiReferenceToolbarShareRegister.vue.js +1 -1
- package/dist/helpers/load-from-perssistance.d.ts +32 -0
- package/dist/helpers/load-from-perssistance.d.ts.map +1 -0
- package/dist/helpers/load-from-perssistance.js +74 -0
- package/dist/helpers/map-config-plugins.d.ts +17 -2
- package/dist/helpers/map-config-plugins.d.ts.map +1 -1
- package/dist/helpers/map-config-plugins.js +20 -22
- package/dist/helpers/map-config-to-workspace-store.d.ts.map +1 -1
- package/dist/helpers/map-config-to-workspace-store.js +1 -8
- package/dist/helpers/storage.d.ts +6 -6
- package/dist/helpers/storage.d.ts.map +1 -1
- package/dist/helpers/storage.js +15 -10
- package/dist/style.css +39 -39
- package/package.json +31 -31
|
@@ -49,33 +49,33 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
49
49
|
const operationExtensions = computed(() => getXKeysFromObject(__props.operation));
|
|
50
50
|
return (_ctx, _cache) => {
|
|
51
51
|
return openBlock(), createBlock(unref(Section), {
|
|
52
|
-
id:
|
|
52
|
+
id: __props.id,
|
|
53
53
|
"aria-labelledby": unref(labelId),
|
|
54
54
|
label: operationTitle.value,
|
|
55
55
|
tabindex: "-1",
|
|
56
|
-
onIntersecting: _cache[1] || (_cache[1] = () =>
|
|
56
|
+
onIntersecting: _cache[1] || (_cache[1] = () => __props.eventBus?.emit("intersecting:nav-item", { id: __props.id }))
|
|
57
57
|
}, {
|
|
58
58
|
default: withCtx(() => [
|
|
59
59
|
createVNode(unref(SectionContent), null, {
|
|
60
60
|
default: withCtx(() => [
|
|
61
61
|
createElementVNode("div", _hoisted_1, [
|
|
62
62
|
createElementVNode("div", _hoisted_2, [
|
|
63
|
-
|
|
63
|
+
__props.options?.showOperationId && __props.operation.operationId ? (openBlock(), createBlock(unref(Badge), { key: 0 }, {
|
|
64
64
|
default: withCtx(() => [
|
|
65
|
-
createTextVNode(toDisplayString(
|
|
65
|
+
createTextVNode(toDisplayString(__props.operation.operationId), 1)
|
|
66
66
|
]),
|
|
67
67
|
_: 1
|
|
68
68
|
})) : createCommentVNode("", true),
|
|
69
|
-
unref(getOperationStability)(
|
|
69
|
+
unref(getOperationStability)(__props.operation) ? (openBlock(), createBlock(unref(Badge), {
|
|
70
70
|
key: 1,
|
|
71
|
-
class: normalizeClass(["capitalize", unref(getOperationStabilityColor)(
|
|
71
|
+
class: normalizeClass(["capitalize", unref(getOperationStabilityColor)(__props.operation)])
|
|
72
72
|
}, {
|
|
73
73
|
default: withCtx(() => [
|
|
74
|
-
createTextVNode(toDisplayString(unref(getOperationStability)(
|
|
74
|
+
createTextVNode(toDisplayString(unref(getOperationStability)(__props.operation)), 1)
|
|
75
75
|
]),
|
|
76
76
|
_: 1
|
|
77
77
|
}, 8, ["class"])) : createCommentVNode("", true),
|
|
78
|
-
|
|
78
|
+
__props.isWebhook ? (openBlock(), createBlock(unref(Badge), {
|
|
79
79
|
key: 2,
|
|
80
80
|
class: "font-code text-green flex w-fit items-center justify-center gap-1"
|
|
81
81
|
}, {
|
|
@@ -86,24 +86,24 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
86
86
|
_: 1
|
|
87
87
|
})) : createCommentVNode("", true),
|
|
88
88
|
createVNode(unref(_sfc_main$1), {
|
|
89
|
-
badges:
|
|
89
|
+
badges: __props.operation["x-badges"],
|
|
90
90
|
position: "before"
|
|
91
91
|
}, null, 8, ["badges"])
|
|
92
92
|
]),
|
|
93
93
|
createElementVNode("div", _hoisted_3, [
|
|
94
94
|
createVNode(unref(_sfc_main$1), {
|
|
95
|
-
badges:
|
|
95
|
+
badges: __props.operation["x-badges"],
|
|
96
96
|
position: "after"
|
|
97
97
|
}, null, 8, ["badges"])
|
|
98
98
|
])
|
|
99
99
|
]),
|
|
100
100
|
createElementVNode("div", {
|
|
101
|
-
class: normalizeClass(unref(isOperationDeprecated)(
|
|
101
|
+
class: normalizeClass(unref(isOperationDeprecated)(__props.operation) ? "deprecated" : "")
|
|
102
102
|
}, [
|
|
103
103
|
createVNode(unref(SectionHeader), null, {
|
|
104
104
|
default: withCtx(() => [
|
|
105
105
|
createVNode(unref(_sfc_main$2), {
|
|
106
|
-
onCopyAnchorUrl: _cache[0] || (_cache[0] = () =>
|
|
106
|
+
onCopyAnchorUrl: _cache[0] || (_cache[0] = () => __props.eventBus?.emit("copy-url:nav-item", { id: __props.id }))
|
|
107
107
|
}, {
|
|
108
108
|
default: withCtx(() => [
|
|
109
109
|
createVNode(unref(SectionHeaderTag), {
|
|
@@ -129,40 +129,40 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
129
129
|
createElementVNode("div", _hoisted_4, [
|
|
130
130
|
createVNode(_sfc_main$3, { value: operationExtensions.value }, null, 8, ["value"]),
|
|
131
131
|
createVNode(unref(ScalarMarkdown), {
|
|
132
|
-
anchorPrefix:
|
|
132
|
+
anchorPrefix: __props.id,
|
|
133
133
|
"aria-label": "Operation Description",
|
|
134
134
|
role: "group",
|
|
135
135
|
transformType: "heading",
|
|
136
|
-
value:
|
|
136
|
+
value: __props.operation.description,
|
|
137
137
|
withAnchors: "",
|
|
138
138
|
withImages: ""
|
|
139
139
|
}, null, 8, ["anchorPrefix", "value"]),
|
|
140
140
|
createVNode(_sfc_main$4, {
|
|
141
|
-
breadcrumb: [
|
|
142
|
-
eventBus:
|
|
143
|
-
options:
|
|
141
|
+
breadcrumb: [__props.id],
|
|
142
|
+
eventBus: __props.eventBus,
|
|
143
|
+
options: __props.options,
|
|
144
144
|
parameters: (
|
|
145
145
|
// These have been resolved in the Operation.vue component
|
|
146
|
-
|
|
146
|
+
__props.operation.parameters
|
|
147
147
|
),
|
|
148
|
-
requestBody: unref(getResolvedRef)(
|
|
148
|
+
requestBody: unref(getResolvedRef)(__props.operation.requestBody)
|
|
149
149
|
}, null, 8, ["breadcrumb", "eventBus", "options", "parameters", "requestBody"]),
|
|
150
150
|
createVNode(_sfc_main$5, {
|
|
151
|
-
breadcrumb: [
|
|
152
|
-
collapsableItems: !
|
|
153
|
-
eventBus:
|
|
154
|
-
options:
|
|
155
|
-
responses:
|
|
151
|
+
breadcrumb: [__props.id],
|
|
152
|
+
collapsableItems: !__props.options.expandAllResponses,
|
|
153
|
+
eventBus: __props.eventBus,
|
|
154
|
+
options: __props.options,
|
|
155
|
+
responses: __props.operation.responses
|
|
156
156
|
}, null, 8, ["breadcrumb", "collapsableItems", "eventBus", "options", "responses"]),
|
|
157
157
|
createVNode(unref(ScalarErrorBoundary), null, {
|
|
158
158
|
default: withCtx(() => [
|
|
159
|
-
|
|
159
|
+
__props.operation.callbacks ? (openBlock(), createBlock(_sfc_main$6, {
|
|
160
160
|
key: 0,
|
|
161
|
-
callbacks:
|
|
161
|
+
callbacks: __props.operation.callbacks,
|
|
162
162
|
class: "mt-6",
|
|
163
|
-
eventBus:
|
|
164
|
-
options:
|
|
165
|
-
path:
|
|
163
|
+
eventBus: __props.eventBus,
|
|
164
|
+
options: __props.options,
|
|
165
|
+
path: __props.path
|
|
166
166
|
}, null, 8, ["callbacks", "eventBus", "options", "path"])) : createCommentVNode("", true)
|
|
167
167
|
]),
|
|
168
168
|
_: 1
|
|
@@ -174,10 +174,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
174
174
|
createVNode(unref(SectionColumn), null, {
|
|
175
175
|
default: withCtx(() => [
|
|
176
176
|
createElementVNode("div", _hoisted_5, [
|
|
177
|
-
|
|
177
|
+
__props.operation.externalDocs ? (openBlock(), createBlock(unref(LinkList), { key: 0 }, {
|
|
178
178
|
default: withCtx(() => [
|
|
179
179
|
createVNode(unref(_sfc_main$7), {
|
|
180
|
-
value:
|
|
180
|
+
value: __props.operation.externalDocs
|
|
181
181
|
}, null, 8, ["value"])
|
|
182
182
|
]),
|
|
183
183
|
_: 1
|
|
@@ -185,35 +185,35 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
185
185
|
createVNode(unref(ScalarErrorBoundary), null, {
|
|
186
186
|
default: withCtx(() => [
|
|
187
187
|
createVNode(unref(OperationCodeSample), {
|
|
188
|
-
clientOptions:
|
|
189
|
-
eventBus:
|
|
188
|
+
clientOptions: __props.clientOptions,
|
|
189
|
+
eventBus: __props.eventBus,
|
|
190
190
|
fallback: "",
|
|
191
|
-
isWebhook:
|
|
192
|
-
method:
|
|
193
|
-
operation:
|
|
194
|
-
path:
|
|
195
|
-
securitySchemes:
|
|
196
|
-
selectedClient:
|
|
197
|
-
selectedServer:
|
|
191
|
+
isWebhook: __props.isWebhook,
|
|
192
|
+
method: __props.method,
|
|
193
|
+
operation: __props.operation,
|
|
194
|
+
path: __props.path,
|
|
195
|
+
securitySchemes: __props.selectedSecuritySchemes,
|
|
196
|
+
selectedClient: __props.selectedClient,
|
|
197
|
+
selectedServer: __props.selectedServer
|
|
198
198
|
}, createSlots({
|
|
199
199
|
header: withCtx(() => [
|
|
200
200
|
createVNode(OperationPath, {
|
|
201
201
|
class: "font-code text-c-2 [&_em]:text-c-1 [&_em]:not-italic",
|
|
202
|
-
deprecated:
|
|
203
|
-
path:
|
|
202
|
+
deprecated: __props.operation?.deprecated,
|
|
203
|
+
path: __props.path
|
|
204
204
|
}, null, 8, ["deprecated", "path"])
|
|
205
205
|
]),
|
|
206
206
|
_: 2
|
|
207
207
|
}, [
|
|
208
|
-
!
|
|
208
|
+
!__props.isWebhook ? {
|
|
209
209
|
name: "footer",
|
|
210
210
|
fn: withCtx(() => [
|
|
211
|
-
!
|
|
211
|
+
!__props.options.hideTestRequestButton ? (openBlock(), createBlock(unref(TestRequestButton), {
|
|
212
212
|
key: 0,
|
|
213
|
-
id:
|
|
214
|
-
eventBus:
|
|
215
|
-
method:
|
|
216
|
-
path:
|
|
213
|
+
id: __props.id,
|
|
214
|
+
eventBus: __props.eventBus,
|
|
215
|
+
method: __props.method,
|
|
216
|
+
path: __props.path
|
|
217
217
|
}, null, 8, ["id", "eventBus", "method", "path"])) : createCommentVNode("", true)
|
|
218
218
|
]),
|
|
219
219
|
key: "0"
|
|
@@ -224,9 +224,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
224
224
|
}),
|
|
225
225
|
createVNode(unref(ScalarErrorBoundary), null, {
|
|
226
226
|
default: withCtx(() => [
|
|
227
|
-
|
|
227
|
+
__props.operation.responses ? (openBlock(), createBlock(unref(ExampleResponses), {
|
|
228
228
|
key: 0,
|
|
229
|
-
responses:
|
|
229
|
+
responses: __props.operation.responses,
|
|
230
230
|
style: { "margin-top": "12px" }
|
|
231
231
|
}, null, 8, ["responses"])) : createCommentVNode("", true)
|
|
232
232
|
]),
|
|
@@ -42,7 +42,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
42
42
|
}
|
|
43
43
|
return (_ctx, _cache) => {
|
|
44
44
|
return openBlock(), createElementBlock(Fragment, null, [
|
|
45
|
-
|
|
45
|
+
__props.forceIcon ? (openBlock(), createBlock(unref(ScalarIconButton), {
|
|
46
46
|
key: 0,
|
|
47
47
|
icon: unref(ScalarIconMagnifyingGlass),
|
|
48
48
|
label: "Search",
|
|
@@ -62,7 +62,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
62
62
|
_cache[2] || (_cache[2] = createElementVNode("span", { class: "sr-only" }, "CTRL", -1)),
|
|
63
63
|
_cache[3] || (_cache[3] = createElementVNode("span", { "aria-hidden": "true" }, "⌃", -1))
|
|
64
64
|
], 64)),
|
|
65
|
-
createTextVNode(" " + toDisplayString(
|
|
65
|
+
createTextVNode(" " + toDisplayString(__props.searchHotKey), 1)
|
|
66
66
|
]),
|
|
67
67
|
default: withCtx(() => [
|
|
68
68
|
_cache[4] || (_cache[4] = createElementVNode("span", { class: "sr-only" }, "Open Search", -1)),
|
|
@@ -74,9 +74,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
74
74
|
_: 1
|
|
75
75
|
}, 8, ["class"])),
|
|
76
76
|
createVNode(SearchModal, {
|
|
77
|
-
document:
|
|
78
|
-
eventBus:
|
|
79
|
-
hideModels:
|
|
77
|
+
document: __props.document,
|
|
78
|
+
eventBus: __props.eventBus,
|
|
79
|
+
hideModels: __props.hideModels,
|
|
80
80
|
modalState: unref(modalState)
|
|
81
81
|
}, null, 8, ["document", "eventBus", "hideModels", "modalState"])
|
|
82
82
|
], 64);
|
|
@@ -53,7 +53,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
53
53
|
return (_ctx, _cache) => {
|
|
54
54
|
return openBlock(), createBlock(unref(ScalarModal), {
|
|
55
55
|
"aria-label": "Reference Search",
|
|
56
|
-
state:
|
|
56
|
+
state: __props.modalState,
|
|
57
57
|
variant: "search"
|
|
58
58
|
}, {
|
|
59
59
|
default: withCtx(() => [
|
|
@@ -29,49 +29,49 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
29
29
|
};
|
|
30
30
|
return (_ctx, _cache) => {
|
|
31
31
|
return openBlock(), createBlock(unref(ScalarSearchResultItem), {
|
|
32
|
-
id:
|
|
33
|
-
icon: ENTRY_ICONS[
|
|
34
|
-
selected:
|
|
32
|
+
id: __props.id,
|
|
33
|
+
icon: ENTRY_ICONS[__props.result.item.type],
|
|
34
|
+
selected: __props.isSelected
|
|
35
35
|
}, createSlots({
|
|
36
36
|
default: withCtx(() => [
|
|
37
37
|
createElementVNode("span", {
|
|
38
38
|
class: normalizeClass({
|
|
39
|
-
"text-decoration-line":
|
|
39
|
+
"text-decoration-line": __props.result.item.entry.type === "operation" && __props.result.item.entry.isDeprecated
|
|
40
40
|
})
|
|
41
41
|
}, [
|
|
42
42
|
createElementVNode("span", _hoisted_1, [
|
|
43
|
-
createTextVNode(toDisplayString(ENTRY_LABELS[
|
|
44
|
-
|
|
43
|
+
createTextVNode(toDisplayString(ENTRY_LABELS[__props.result.item.type]) + ": ", 1),
|
|
44
|
+
__props.result.item.entry.type === "operation" && __props.result.item.entry.isDeprecated ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
45
45
|
createTextVNode(" (Deprecated) ")
|
|
46
46
|
], 64)) : createCommentVNode("", true)
|
|
47
47
|
]),
|
|
48
|
-
createTextVNode(" " + toDisplayString(
|
|
48
|
+
createTextVNode(" " + toDisplayString(__props.result.item.title) + " ", 1),
|
|
49
49
|
_cache[0] || (_cache[0] = createElementVNode("span", { class: "sr-only" }, ",", -1))
|
|
50
50
|
], 2)
|
|
51
51
|
]),
|
|
52
52
|
_: 2
|
|
53
53
|
}, [
|
|
54
|
-
|
|
54
|
+
__props.result.item.type !== "webhook" && (__props.result.item.method || __props.result.item.path) && __props.result.item.path !== __props.result.item.title ? {
|
|
55
55
|
name: "description",
|
|
56
56
|
fn: withCtx(() => [
|
|
57
57
|
createElementVNode("span", _hoisted_2, [
|
|
58
|
-
|
|
58
|
+
__props.result.item.type === "operation" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
59
59
|
createVNode(unref(HttpMethod), {
|
|
60
60
|
"aria-hidden": "true",
|
|
61
|
-
method:
|
|
61
|
+
method: __props.result.item.method ?? "get"
|
|
62
62
|
}, null, 8, ["method"]),
|
|
63
|
-
createElementVNode("span", _hoisted_3, " HTTP Method: " + toDisplayString(
|
|
63
|
+
createElementVNode("span", _hoisted_3, " HTTP Method: " + toDisplayString(__props.result.item.method ?? "get"), 1)
|
|
64
64
|
], 64)) : createCommentVNode("", true),
|
|
65
65
|
_cache[1] || (_cache[1] = createElementVNode("span", { class: "sr-only" }, "Path: ", -1)),
|
|
66
|
-
createTextVNode(" " + toDisplayString(
|
|
66
|
+
createTextVNode(" " + toDisplayString(__props.result.item.path), 1)
|
|
67
67
|
])
|
|
68
68
|
]),
|
|
69
69
|
key: "0"
|
|
70
|
-
} :
|
|
70
|
+
} : __props.result.item.description ? {
|
|
71
71
|
name: "description",
|
|
72
72
|
fn: withCtx(() => [
|
|
73
73
|
_cache[2] || (_cache[2] = createElementVNode("span", { class: "sr-only" }, "Description: ", -1)),
|
|
74
|
-
createTextVNode(" " + toDisplayString(
|
|
74
|
+
createTextVNode(" " + toDisplayString(__props.result.item.description), 1)
|
|
75
75
|
]),
|
|
76
76
|
key: "1"
|
|
77
77
|
} : void 0
|
|
@@ -34,17 +34,17 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
34
34
|
() => prettyPrintJson(getContent())
|
|
35
35
|
);
|
|
36
36
|
return (_ctx, _cache) => {
|
|
37
|
-
return
|
|
37
|
+
return __props.example !== void 0 && !shouldVirtualize.value ? (openBlock(), createBlock(unref(ScalarCodeBlock), {
|
|
38
38
|
key: 0,
|
|
39
39
|
class: "bg-b-2 -outline-offset-2",
|
|
40
40
|
lang: "json",
|
|
41
41
|
prettyPrintedContent: prettyPrintedContent.value
|
|
42
|
-
}, null, 8, ["prettyPrintedContent"])) :
|
|
42
|
+
}, null, 8, ["prettyPrintedContent"])) : __props.response?.schema && !shouldVirtualize.value ? (openBlock(), createBlock(unref(ScalarCodeBlock), {
|
|
43
43
|
key: 1,
|
|
44
44
|
class: "bg-b-2 -outline-offset-2",
|
|
45
45
|
lang: "json",
|
|
46
46
|
prettyPrintedContent: prettyPrintedContent.value
|
|
47
|
-
}, null, 8, ["prettyPrintedContent"])) : (
|
|
47
|
+
}, null, 8, ["prettyPrintedContent"])) : (__props.example !== void 0 || __props.response?.schema) && shouldVirtualize.value ? (openBlock(), createBlock(unref(ScalarVirtualText), {
|
|
48
48
|
key: 2,
|
|
49
49
|
containerClass: "custom-scroll scalar-code-block border rounded-b flex flex-1 max-h-screen",
|
|
50
50
|
contentClass: "language-plaintext whitespace-pre font-code text-base",
|
|
@@ -20,9 +20,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
20
20
|
},
|
|
21
21
|
setup(__props) {
|
|
22
22
|
return (_ctx, _cache) => {
|
|
23
|
-
return
|
|
23
|
+
return __props.value ? (openBlock(), createElementBlock("div", _hoisted_1, [
|
|
24
24
|
createElementVNode("a", {
|
|
25
|
-
href:
|
|
25
|
+
href: __props.value.url,
|
|
26
26
|
class: "text-c-1 hover:bg-b-2 mr-2 flex min-h-7 min-w-7 items-center rounded-lg border px-2 py-1 no-underline group-last:mr-0 xl:border-none",
|
|
27
27
|
target: "_blank",
|
|
28
28
|
rel: "noopener noreferrer"
|
|
@@ -31,7 +31,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
31
31
|
weight: "bold",
|
|
32
32
|
class: "size-3 text-current"
|
|
33
33
|
}),
|
|
34
|
-
|
|
34
|
+
__props.value.description ? (openBlock(), createElementBlock("span", _hoisted_3, toDisplayString(__props.value.description), 1)) : (openBlock(), createElementBlock("span", _hoisted_4, toDisplayString(__props.value.url), 1))
|
|
35
35
|
], 8, _hoisted_2)
|
|
36
36
|
])) : createCommentVNode("", true);
|
|
37
37
|
};
|
|
@@ -22,21 +22,21 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
22
22
|
}
|
|
23
23
|
});
|
|
24
24
|
return (_ctx, _cache) => {
|
|
25
|
-
return
|
|
26
|
-
|
|
25
|
+
return __props.value ? (openBlock(), createElementBlock("div", _hoisted_1, [
|
|
26
|
+
__props.value?.email ? (openBlock(), createElementBlock("a", {
|
|
27
27
|
key: 0,
|
|
28
28
|
class: normalizeClass(unref(variants)({ link: true })),
|
|
29
|
-
href: `mailto:${
|
|
29
|
+
href: `mailto:${__props.value?.email}`
|
|
30
30
|
}, [
|
|
31
31
|
createVNode(unref(ScalarIconEnvelopeSimple), {
|
|
32
32
|
weight: "bold",
|
|
33
33
|
class: "size-3 text-current"
|
|
34
34
|
}),
|
|
35
|
-
createElementVNode("span", _hoisted_3, toDisplayString(
|
|
36
|
-
], 10, _hoisted_2)) :
|
|
35
|
+
createElementVNode("span", _hoisted_3, toDisplayString(__props.value.name), 1)
|
|
36
|
+
], 10, _hoisted_2)) : __props.value?.name ? (openBlock(), createElementBlock("span", {
|
|
37
37
|
key: 1,
|
|
38
38
|
class: normalizeClass(unref(variants)({ link: false }))
|
|
39
|
-
}, toDisplayString(
|
|
39
|
+
}, toDisplayString(__props.value.name), 3)) : createCommentVNode("", true)
|
|
40
40
|
])) : createCommentVNode("", true);
|
|
41
41
|
};
|
|
42
42
|
}
|
|
@@ -12,10 +12,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
12
12
|
setup(__props) {
|
|
13
13
|
return (_ctx, _cache) => {
|
|
14
14
|
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
15
|
-
|
|
15
|
+
__props.value?.url ? (openBlock(), createElementBlock("a", {
|
|
16
16
|
key: 0,
|
|
17
17
|
class: "text-c-1 hover:bg-b-2 mr-2 flex min-h-7 min-w-7 items-center rounded-lg border px-2 py-1 no-underline group-last:mr-0 xl:border-none",
|
|
18
|
-
href:
|
|
18
|
+
href: __props.value.url,
|
|
19
19
|
target: "_blank",
|
|
20
20
|
rel: "noopener noreferrer"
|
|
21
21
|
}, [
|
|
@@ -23,13 +23,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
23
23
|
weight: "bold",
|
|
24
24
|
class: "size-3 text-current"
|
|
25
25
|
}),
|
|
26
|
-
createElementVNode("span", _hoisted_3, toDisplayString(
|
|
26
|
+
createElementVNode("span", _hoisted_3, toDisplayString(__props.value?.name || __props.value.identifier || __props.value.url), 1)
|
|
27
27
|
], 8, _hoisted_2)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
28
28
|
createVNode(unref(ScalarIconGavel), {
|
|
29
29
|
weight: "bold",
|
|
30
30
|
class: "size-3 text-current"
|
|
31
31
|
}),
|
|
32
|
-
createElementVNode("span", _hoisted_4, toDisplayString(
|
|
32
|
+
createElementVNode("span", _hoisted_4, toDisplayString(__props.value?.name), 1)
|
|
33
33
|
], 64))
|
|
34
34
|
]);
|
|
35
35
|
};
|
|
@@ -12,10 +12,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
12
12
|
},
|
|
13
13
|
setup(__props) {
|
|
14
14
|
return (_ctx, _cache) => {
|
|
15
|
-
return
|
|
15
|
+
return __props.value ? (openBlock(), createElementBlock("div", _hoisted_1, [
|
|
16
16
|
createElementVNode("a", {
|
|
17
17
|
class: "text-c-1 hover:bg-b-2 mr-2 flex min-h-7 min-w-7 items-center rounded-lg border px-2 py-1 no-underline group-last:mr-0 xl:border-none",
|
|
18
|
-
href:
|
|
18
|
+
href: __props.value,
|
|
19
19
|
target: "_blank",
|
|
20
20
|
rel: "noopener noreferrer"
|
|
21
21
|
}, [
|
|
@@ -27,7 +27,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
27
27
|
() => formattedOptions.value.find((o) => o.id === props.modelValue)
|
|
28
28
|
);
|
|
29
29
|
return (_ctx, _cache) => {
|
|
30
|
-
return
|
|
30
|
+
return __props.options.length > 1 ? (openBlock(), createElementBlock("div", _hoisted_1, [
|
|
31
31
|
createVNode(unref(ScalarListbox), {
|
|
32
32
|
modelValue: selected.value,
|
|
33
33
|
options: formattedOptions.value,
|
|
@@ -25,7 +25,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
25
25
|
() => getCustomOpenApiExtensionComponents(customExtensionNames.value)
|
|
26
26
|
);
|
|
27
27
|
return (_ctx, _cache) => {
|
|
28
|
-
return typeof
|
|
28
|
+
return typeof __props.value === "object" && customExtensions.value.length ? (openBlock(), createElementBlock("div", _hoisted_1, [
|
|
29
29
|
(openBlock(true), createElementBlock(Fragment, null, renderList(customExtensions.value, (extension) => {
|
|
30
30
|
return openBlock(), createBlock(unref(ScalarErrorBoundary), null, {
|
|
31
31
|
default: withCtx(() => [
|
|
@@ -33,12 +33,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
33
33
|
key: 0,
|
|
34
34
|
ref_for: true
|
|
35
35
|
}, {
|
|
36
|
-
[extension.name]:
|
|
36
|
+
[extension.name]: __props.value?.[extension.name],
|
|
37
37
|
component: extension.component
|
|
38
38
|
}), null, 16)) : (openBlock(), createBlock(resolveDynamicComponent(extension.component), mergeProps({
|
|
39
39
|
key: 1,
|
|
40
40
|
ref_for: true
|
|
41
|
-
}, { [extension.name]:
|
|
41
|
+
}, { [extension.name]: __props.value?.[extension.name] }), null, 16))
|
|
42
42
|
]),
|
|
43
43
|
_: 2
|
|
44
44
|
}, 1024);
|
|
@@ -15,7 +15,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
15
15
|
return (_ctx, _cache) => {
|
|
16
16
|
return openBlock(), createElementBlock("button", {
|
|
17
17
|
class: "show-api-client-button",
|
|
18
|
-
method:
|
|
18
|
+
method: __props.method,
|
|
19
19
|
type: "button",
|
|
20
20
|
onClick: withModifiers(handleClick, ["stop"])
|
|
21
21
|
}, [
|
|
@@ -26,7 +26,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
26
26
|
_cache[0] || (_cache[0] = createElementVNode("span", null, "Test Request", -1)),
|
|
27
27
|
createVNode(ScreenReader, null, {
|
|
28
28
|
default: withCtx(() => [
|
|
29
|
-
createTextVNode("(" + toDisplayString(
|
|
29
|
+
createTextVNode("(" + toDisplayString(__props.method) + " " + toDisplayString(__props.path) + ")", 1)
|
|
30
30
|
]),
|
|
31
31
|
_: 1
|
|
32
32
|
})
|
|
@@ -41,14 +41,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
41
41
|
createElementVNode("div", _hoisted_3, [
|
|
42
42
|
createVNode(_sfc_main$1)
|
|
43
43
|
]),
|
|
44
|
-
|
|
45
|
-
createVNode(_sfc_main$2, { workspace:
|
|
46
|
-
createVNode(_sfc_main$3, { workspace:
|
|
44
|
+
__props.workspace ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
45
|
+
createVNode(_sfc_main$2, { workspace: __props.workspace }, null, 8, ["workspace"]),
|
|
46
|
+
createVNode(_sfc_main$3, { workspace: __props.workspace }, null, 8, ["workspace"])
|
|
47
47
|
], 64)) : createCommentVNode("", true),
|
|
48
48
|
createVNode(_sfc_main$4, {
|
|
49
49
|
overrides: overrides.value,
|
|
50
50
|
"onUpdate:overrides": _cache[0] || (_cache[0] = ($event) => overrides.value = $event),
|
|
51
|
-
configuration:
|
|
51
|
+
configuration: __props.configuration
|
|
52
52
|
}, null, 8, ["overrides", "configuration"])
|
|
53
53
|
])
|
|
54
54
|
])) : createCommentVNode("", true);
|
|
@@ -86,7 +86,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
86
86
|
createVNode(_sfc_main$4, {
|
|
87
87
|
modelValue: overrides.value,
|
|
88
88
|
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => overrides.value = $event),
|
|
89
|
-
configuration:
|
|
89
|
+
configuration: __props.configuration
|
|
90
90
|
}, null, 8, ["modelValue", "configuration"])
|
|
91
91
|
]),
|
|
92
92
|
_: 1
|
|
@@ -62,7 +62,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
62
62
|
}),
|
|
63
63
|
createVNode(_sfc_main$2, {
|
|
64
64
|
sdks: selectedLanguages.value,
|
|
65
|
-
workspace:
|
|
65
|
+
workspace: __props.workspace
|
|
66
66
|
}, null, 8, ["sdks", "workspace"]),
|
|
67
67
|
createVNode(ApiReferenceToolbarBlurb, null, {
|
|
68
68
|
default: withCtx(() => [..._cache[2] || (_cache[2] = [
|
|
@@ -20,7 +20,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
20
20
|
createTextVNode("Temporary Link", -1)
|
|
21
21
|
])]),
|
|
22
22
|
default: withCtx(() => [
|
|
23
|
-
createVNode(_sfc_main$2, { workspace:
|
|
23
|
+
createVNode(_sfc_main$2, { workspace: __props.workspace }, null, 8, ["workspace"])
|
|
24
24
|
]),
|
|
25
25
|
_: 1
|
|
26
26
|
}),
|
|
@@ -29,7 +29,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
29
29
|
createTextVNode("Cloud Hosting", -1)
|
|
30
30
|
])]),
|
|
31
31
|
default: withCtx(() => [
|
|
32
|
-
createVNode(_sfc_main$3, { workspace:
|
|
32
|
+
createVNode(_sfc_main$3, { workspace: __props.workspace }, null, 8, ["workspace"])
|
|
33
33
|
]),
|
|
34
34
|
_: 1
|
|
35
35
|
})
|
|
@@ -33,7 +33,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
33
33
|
]);
|
|
34
34
|
}), 64))
|
|
35
35
|
]),
|
|
36
|
-
createVNode(_sfc_main$1, { workspace:
|
|
36
|
+
createVNode(_sfc_main$1, { workspace: __props.workspace }, {
|
|
37
37
|
default: withCtx(() => [..._cache[0] || (_cache[0] = [
|
|
38
38
|
createTextVNode(" Deploy on Scalar ", -1)
|
|
39
39
|
])]),
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { WorkspaceStore } from '@scalar/workspace-store/client';
|
|
2
|
+
/**
|
|
3
|
+
* Loads the default HTTP client from storage and applies it to the workspace.
|
|
4
|
+
* Only updates if no default client is already set.
|
|
5
|
+
*/
|
|
6
|
+
export declare const loadClientFromStorage: (store: WorkspaceStore) => void;
|
|
7
|
+
/**
|
|
8
|
+
* Checks if a key is a Scalar secret key.
|
|
9
|
+
* Secret keys start with 'x-scalar-secret-' prefix.
|
|
10
|
+
*/
|
|
11
|
+
export declare const isSecretKey: (key: string) => boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Recursively merges secret values from stored data into the current schema.
|
|
14
|
+
* Only merges secrets if the corresponding structure exists in the current schema.
|
|
15
|
+
*
|
|
16
|
+
* This function walks through both objects in parallel, copying any keys that
|
|
17
|
+
* start with 'x-scalar-secret-' from the stored object to the current object,
|
|
18
|
+
* but only if the path exists in the current schema.
|
|
19
|
+
*
|
|
20
|
+
* @param current - The current schema object (source of truth for structure)
|
|
21
|
+
* @param stored - The stored object containing secret values to restore
|
|
22
|
+
*/
|
|
23
|
+
export declare const mergeSecrets: (current: unknown, stored: unknown) => void;
|
|
24
|
+
/**
|
|
25
|
+
* Loads authentication schemes and selected security settings from local storage.
|
|
26
|
+
*
|
|
27
|
+
* This function restores both the available security schemes and the user's
|
|
28
|
+
* selected security configuration for the active document. It validates that
|
|
29
|
+
* the stored schemes still exist in the current document before restoring them.
|
|
30
|
+
*/
|
|
31
|
+
export declare const loadAuthSchemesFromStorage: (store: WorkspaceStore) => void;
|
|
32
|
+
//# sourceMappingURL=load-from-perssistance.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"load-from-perssistance.d.ts","sourceRoot":"","sources":["../../src/helpers/load-from-perssistance.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;AAYpE;;;GAGG;AACH,eAAO,MAAM,qBAAqB,GAAI,OAAO,cAAc,KAAG,IAM7D,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,WAAW,GAAI,KAAK,MAAM,KAAG,OAA4C,CAAA;AAEtF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,YAAY,GAAI,SAAS,OAAO,EAAE,QAAQ,OAAO,KAAG,IAgBhE,CAAA;AA4CD;;;;;;GAMG;AACH,eAAO,MAAM,0BAA0B,GAAI,OAAO,cAAc,KAAG,IAkClE,CAAA"}
|