@scalar/api-reference 1.39.0 → 1.39.1
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 +15 -0
- package/dist/browser/standalone.js +4323 -4323
- package/dist/browser/webpack-stats.json +1 -1
- package/dist/components/ApiReference.vue.d.ts +256 -1
- package/dist/components/ApiReference.vue.d.ts.map +1 -1
- package/dist/components/ApiReference.vue.js +1 -1
- package/dist/components/ApiReference.vue2.js +14 -18
- package/dist/style.css +221 -77
- package/package.json +13 -13
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { OpenAPIV3_1 } from '@scalar/openapi-types';
|
|
1
2
|
import { type AnyApiReferenceConfiguration } from '@scalar/types/api-reference';
|
|
2
3
|
type __VLS_Props = {
|
|
3
4
|
/**
|
|
@@ -26,7 +27,261 @@ type __VLS_Slots = {
|
|
|
26
27
|
breadcrumb: string;
|
|
27
28
|
};
|
|
28
29
|
};
|
|
29
|
-
declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {
|
|
30
|
+
declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {
|
|
31
|
+
dereferenced: import("vue").Ref<{
|
|
32
|
+
[x: `x-${string}`]: any;
|
|
33
|
+
[x: string]: any;
|
|
34
|
+
openapi?: "3.1.0" | "3.1.1" | "3.1.2" | undefined;
|
|
35
|
+
swagger?: never | undefined;
|
|
36
|
+
info?: {
|
|
37
|
+
title?: string | undefined;
|
|
38
|
+
description?: string | undefined;
|
|
39
|
+
termsOfService?: string | undefined;
|
|
40
|
+
contact?: {
|
|
41
|
+
name?: string | undefined;
|
|
42
|
+
url?: string | undefined;
|
|
43
|
+
email?: string | undefined;
|
|
44
|
+
} | undefined;
|
|
45
|
+
version?: string | undefined;
|
|
46
|
+
summary?: string | undefined;
|
|
47
|
+
license?: {
|
|
48
|
+
name?: string | undefined;
|
|
49
|
+
url?: string | undefined;
|
|
50
|
+
identifier?: string | undefined;
|
|
51
|
+
} | undefined;
|
|
52
|
+
} | undefined;
|
|
53
|
+
jsonSchemaDialect?: string | undefined;
|
|
54
|
+
servers?: {
|
|
55
|
+
url?: string | undefined;
|
|
56
|
+
description?: string | undefined;
|
|
57
|
+
variables?: Record<string, OpenAPIV3_1.ServerVariableObject> | undefined;
|
|
58
|
+
}[] | undefined;
|
|
59
|
+
paths?: OpenAPIV3_1.PathsObject<{}, {}> | undefined;
|
|
60
|
+
components?: {
|
|
61
|
+
schemas?: Record<string, OpenAPIV3_1.SchemaObject> | undefined;
|
|
62
|
+
responses?: Record<string, OpenAPIV3_1.ReferenceObject | OpenAPIV3_1.ResponseObject> | undefined;
|
|
63
|
+
parameters?: Record<string, OpenAPIV3_1.ReferenceObject | OpenAPIV3_1.ParameterObject> | undefined;
|
|
64
|
+
examples?: Record<string, OpenAPIV3_1.ReferenceObject | OpenAPIV3_1.ExampleObject> | undefined;
|
|
65
|
+
requestBodies?: Record<string, OpenAPIV3_1.ReferenceObject | OpenAPIV3_1.RequestBodyObject> | undefined;
|
|
66
|
+
headers?: Record<string, OpenAPIV3_1.ReferenceObject | OpenAPIV3_1.HeaderObject> | undefined;
|
|
67
|
+
securitySchemes?: Record<string, OpenAPIV3_1.ReferenceObject | OpenAPIV3_1.SecuritySchemeObject> | undefined;
|
|
68
|
+
links?: Record<string, OpenAPIV3_1.ReferenceObject | OpenAPIV3_1.LinkObject> | undefined;
|
|
69
|
+
callbacks?: Record<string, OpenAPIV3_1.ReferenceObject | OpenAPIV3_1.CallbackObject> | undefined;
|
|
70
|
+
pathItems?: Record<string, OpenAPIV3_1.ReferenceObject | OpenAPIV3_1.PathItemObject> | undefined;
|
|
71
|
+
} | undefined;
|
|
72
|
+
webhooks?: Record<string, OpenAPIV3_1.PathItemObject | OpenAPIV3_1.ReferenceObject> | undefined;
|
|
73
|
+
} | {
|
|
74
|
+
[x: `x-${string}`]: any;
|
|
75
|
+
[x: string]: any;
|
|
76
|
+
openapi?: "3.1.0" | "3.1.1" | "3.1.2" | undefined;
|
|
77
|
+
swagger?: never | undefined;
|
|
78
|
+
info?: {
|
|
79
|
+
title?: string | undefined;
|
|
80
|
+
description?: string | undefined;
|
|
81
|
+
termsOfService?: string | undefined;
|
|
82
|
+
contact?: {
|
|
83
|
+
name?: string | undefined;
|
|
84
|
+
url?: string | undefined;
|
|
85
|
+
email?: string | undefined;
|
|
86
|
+
} | undefined;
|
|
87
|
+
version?: string | undefined;
|
|
88
|
+
summary?: string | undefined;
|
|
89
|
+
license?: {
|
|
90
|
+
name?: string | undefined;
|
|
91
|
+
url?: string | undefined;
|
|
92
|
+
identifier?: string | undefined;
|
|
93
|
+
} | undefined;
|
|
94
|
+
} | undefined;
|
|
95
|
+
jsonSchemaDialect?: string | undefined;
|
|
96
|
+
servers?: {
|
|
97
|
+
url?: string | undefined;
|
|
98
|
+
description?: string | undefined;
|
|
99
|
+
variables?: Record<string, OpenAPIV3_1.ServerVariableObject> | undefined;
|
|
100
|
+
}[] | undefined;
|
|
101
|
+
webhooks?: Record<string, OpenAPIV3_1.PathItemObject | OpenAPIV3_1.ReferenceObject> | undefined;
|
|
102
|
+
components?: {
|
|
103
|
+
schemas?: Record<string, OpenAPIV3_1.SchemaObject> | undefined;
|
|
104
|
+
responses?: Record<string, OpenAPIV3_1.ReferenceObject | OpenAPIV3_1.ResponseObject> | undefined;
|
|
105
|
+
parameters?: Record<string, OpenAPIV3_1.ReferenceObject | OpenAPIV3_1.ParameterObject> | undefined;
|
|
106
|
+
examples?: Record<string, OpenAPIV3_1.ReferenceObject | OpenAPIV3_1.ExampleObject> | undefined;
|
|
107
|
+
requestBodies?: Record<string, OpenAPIV3_1.ReferenceObject | OpenAPIV3_1.RequestBodyObject> | undefined;
|
|
108
|
+
headers?: Record<string, OpenAPIV3_1.ReferenceObject | OpenAPIV3_1.HeaderObject> | undefined;
|
|
109
|
+
securitySchemes?: Record<string, OpenAPIV3_1.ReferenceObject | OpenAPIV3_1.SecuritySchemeObject> | undefined;
|
|
110
|
+
links?: Record<string, OpenAPIV3_1.ReferenceObject | OpenAPIV3_1.LinkObject> | undefined;
|
|
111
|
+
callbacks?: Record<string, OpenAPIV3_1.ReferenceObject | OpenAPIV3_1.CallbackObject> | undefined;
|
|
112
|
+
pathItems?: Record<string, OpenAPIV3_1.ReferenceObject | OpenAPIV3_1.PathItemObject> | undefined;
|
|
113
|
+
} | undefined;
|
|
114
|
+
paths?: OpenAPIV3_1.PathsObject<{}, {}> | undefined;
|
|
115
|
+
} | {
|
|
116
|
+
[x: `x-${string}`]: any;
|
|
117
|
+
[x: string]: any;
|
|
118
|
+
openapi?: "3.1.0" | "3.1.1" | "3.1.2" | undefined;
|
|
119
|
+
swagger?: never | undefined;
|
|
120
|
+
info?: {
|
|
121
|
+
title?: string | undefined;
|
|
122
|
+
description?: string | undefined;
|
|
123
|
+
termsOfService?: string | undefined;
|
|
124
|
+
contact?: {
|
|
125
|
+
name?: string | undefined;
|
|
126
|
+
url?: string | undefined;
|
|
127
|
+
email?: string | undefined;
|
|
128
|
+
} | undefined;
|
|
129
|
+
version?: string | undefined;
|
|
130
|
+
summary?: string | undefined;
|
|
131
|
+
license?: {
|
|
132
|
+
name?: string | undefined;
|
|
133
|
+
url?: string | undefined;
|
|
134
|
+
identifier?: string | undefined;
|
|
135
|
+
} | undefined;
|
|
136
|
+
} | undefined;
|
|
137
|
+
jsonSchemaDialect?: string | undefined;
|
|
138
|
+
servers?: {
|
|
139
|
+
url?: string | undefined;
|
|
140
|
+
description?: string | undefined;
|
|
141
|
+
variables?: Record<string, OpenAPIV3_1.ServerVariableObject> | undefined;
|
|
142
|
+
}[] | undefined;
|
|
143
|
+
components?: {
|
|
144
|
+
schemas?: Record<string, OpenAPIV3_1.SchemaObject> | undefined;
|
|
145
|
+
responses?: Record<string, OpenAPIV3_1.ReferenceObject | OpenAPIV3_1.ResponseObject> | undefined;
|
|
146
|
+
parameters?: Record<string, OpenAPIV3_1.ReferenceObject | OpenAPIV3_1.ParameterObject> | undefined;
|
|
147
|
+
examples?: Record<string, OpenAPIV3_1.ReferenceObject | OpenAPIV3_1.ExampleObject> | undefined;
|
|
148
|
+
requestBodies?: Record<string, OpenAPIV3_1.ReferenceObject | OpenAPIV3_1.RequestBodyObject> | undefined;
|
|
149
|
+
headers?: Record<string, OpenAPIV3_1.ReferenceObject | OpenAPIV3_1.HeaderObject> | undefined;
|
|
150
|
+
securitySchemes?: Record<string, OpenAPIV3_1.ReferenceObject | OpenAPIV3_1.SecuritySchemeObject> | undefined;
|
|
151
|
+
links?: Record<string, OpenAPIV3_1.ReferenceObject | OpenAPIV3_1.LinkObject> | undefined;
|
|
152
|
+
callbacks?: Record<string, OpenAPIV3_1.ReferenceObject | OpenAPIV3_1.CallbackObject> | undefined;
|
|
153
|
+
pathItems?: Record<string, OpenAPIV3_1.ReferenceObject | OpenAPIV3_1.PathItemObject> | undefined;
|
|
154
|
+
} | undefined;
|
|
155
|
+
webhooks?: Record<string, OpenAPIV3_1.PathItemObject | OpenAPIV3_1.ReferenceObject> | undefined;
|
|
156
|
+
paths?: OpenAPIV3_1.PathsObject<{}, {}> | undefined;
|
|
157
|
+
} | null, OpenAPIV3_1.Document<{}> | {
|
|
158
|
+
[x: `x-${string}`]: any;
|
|
159
|
+
[x: string]: any;
|
|
160
|
+
openapi?: "3.1.0" | "3.1.1" | "3.1.2" | undefined;
|
|
161
|
+
swagger?: never | undefined;
|
|
162
|
+
info?: {
|
|
163
|
+
title?: string | undefined;
|
|
164
|
+
description?: string | undefined;
|
|
165
|
+
termsOfService?: string | undefined;
|
|
166
|
+
contact?: {
|
|
167
|
+
name?: string | undefined;
|
|
168
|
+
url?: string | undefined;
|
|
169
|
+
email?: string | undefined;
|
|
170
|
+
} | undefined;
|
|
171
|
+
version?: string | undefined;
|
|
172
|
+
summary?: string | undefined;
|
|
173
|
+
license?: {
|
|
174
|
+
name?: string | undefined;
|
|
175
|
+
url?: string | undefined;
|
|
176
|
+
identifier?: string | undefined;
|
|
177
|
+
} | undefined;
|
|
178
|
+
} | undefined;
|
|
179
|
+
jsonSchemaDialect?: string | undefined;
|
|
180
|
+
servers?: {
|
|
181
|
+
url?: string | undefined;
|
|
182
|
+
description?: string | undefined;
|
|
183
|
+
variables?: Record<string, OpenAPIV3_1.ServerVariableObject> | undefined;
|
|
184
|
+
}[] | undefined;
|
|
185
|
+
paths?: OpenAPIV3_1.PathsObject<{}, {}> | undefined;
|
|
186
|
+
components?: {
|
|
187
|
+
schemas?: Record<string, OpenAPIV3_1.SchemaObject> | undefined;
|
|
188
|
+
responses?: Record<string, OpenAPIV3_1.ReferenceObject | OpenAPIV3_1.ResponseObject> | undefined;
|
|
189
|
+
parameters?: Record<string, OpenAPIV3_1.ReferenceObject | OpenAPIV3_1.ParameterObject> | undefined;
|
|
190
|
+
examples?: Record<string, OpenAPIV3_1.ReferenceObject | OpenAPIV3_1.ExampleObject> | undefined;
|
|
191
|
+
requestBodies?: Record<string, OpenAPIV3_1.ReferenceObject | OpenAPIV3_1.RequestBodyObject> | undefined;
|
|
192
|
+
headers?: Record<string, OpenAPIV3_1.ReferenceObject | OpenAPIV3_1.HeaderObject> | undefined;
|
|
193
|
+
securitySchemes?: Record<string, OpenAPIV3_1.ReferenceObject | OpenAPIV3_1.SecuritySchemeObject> | undefined;
|
|
194
|
+
links?: Record<string, OpenAPIV3_1.ReferenceObject | OpenAPIV3_1.LinkObject> | undefined;
|
|
195
|
+
callbacks?: Record<string, OpenAPIV3_1.ReferenceObject | OpenAPIV3_1.CallbackObject> | undefined;
|
|
196
|
+
pathItems?: Record<string, OpenAPIV3_1.ReferenceObject | OpenAPIV3_1.PathItemObject> | undefined;
|
|
197
|
+
} | undefined;
|
|
198
|
+
webhooks?: Record<string, OpenAPIV3_1.PathItemObject | OpenAPIV3_1.ReferenceObject> | undefined;
|
|
199
|
+
} | {
|
|
200
|
+
[x: `x-${string}`]: any;
|
|
201
|
+
[x: string]: any;
|
|
202
|
+
openapi?: "3.1.0" | "3.1.1" | "3.1.2" | undefined;
|
|
203
|
+
swagger?: never | undefined;
|
|
204
|
+
info?: {
|
|
205
|
+
title?: string | undefined;
|
|
206
|
+
description?: string | undefined;
|
|
207
|
+
termsOfService?: string | undefined;
|
|
208
|
+
contact?: {
|
|
209
|
+
name?: string | undefined;
|
|
210
|
+
url?: string | undefined;
|
|
211
|
+
email?: string | undefined;
|
|
212
|
+
} | undefined;
|
|
213
|
+
version?: string | undefined;
|
|
214
|
+
summary?: string | undefined;
|
|
215
|
+
license?: {
|
|
216
|
+
name?: string | undefined;
|
|
217
|
+
url?: string | undefined;
|
|
218
|
+
identifier?: string | undefined;
|
|
219
|
+
} | undefined;
|
|
220
|
+
} | undefined;
|
|
221
|
+
jsonSchemaDialect?: string | undefined;
|
|
222
|
+
servers?: {
|
|
223
|
+
url?: string | undefined;
|
|
224
|
+
description?: string | undefined;
|
|
225
|
+
variables?: Record<string, OpenAPIV3_1.ServerVariableObject> | undefined;
|
|
226
|
+
}[] | undefined;
|
|
227
|
+
webhooks?: Record<string, OpenAPIV3_1.PathItemObject | OpenAPIV3_1.ReferenceObject> | undefined;
|
|
228
|
+
components?: {
|
|
229
|
+
schemas?: Record<string, OpenAPIV3_1.SchemaObject> | undefined;
|
|
230
|
+
responses?: Record<string, OpenAPIV3_1.ReferenceObject | OpenAPIV3_1.ResponseObject> | undefined;
|
|
231
|
+
parameters?: Record<string, OpenAPIV3_1.ReferenceObject | OpenAPIV3_1.ParameterObject> | undefined;
|
|
232
|
+
examples?: Record<string, OpenAPIV3_1.ReferenceObject | OpenAPIV3_1.ExampleObject> | undefined;
|
|
233
|
+
requestBodies?: Record<string, OpenAPIV3_1.ReferenceObject | OpenAPIV3_1.RequestBodyObject> | undefined;
|
|
234
|
+
headers?: Record<string, OpenAPIV3_1.ReferenceObject | OpenAPIV3_1.HeaderObject> | undefined;
|
|
235
|
+
securitySchemes?: Record<string, OpenAPIV3_1.ReferenceObject | OpenAPIV3_1.SecuritySchemeObject> | undefined;
|
|
236
|
+
links?: Record<string, OpenAPIV3_1.ReferenceObject | OpenAPIV3_1.LinkObject> | undefined;
|
|
237
|
+
callbacks?: Record<string, OpenAPIV3_1.ReferenceObject | OpenAPIV3_1.CallbackObject> | undefined;
|
|
238
|
+
pathItems?: Record<string, OpenAPIV3_1.ReferenceObject | OpenAPIV3_1.PathItemObject> | undefined;
|
|
239
|
+
} | undefined;
|
|
240
|
+
paths?: OpenAPIV3_1.PathsObject<{}, {}> | undefined;
|
|
241
|
+
} | {
|
|
242
|
+
[x: `x-${string}`]: any;
|
|
243
|
+
[x: string]: any;
|
|
244
|
+
openapi?: "3.1.0" | "3.1.1" | "3.1.2" | undefined;
|
|
245
|
+
swagger?: never | undefined;
|
|
246
|
+
info?: {
|
|
247
|
+
title?: string | undefined;
|
|
248
|
+
description?: string | undefined;
|
|
249
|
+
termsOfService?: string | undefined;
|
|
250
|
+
contact?: {
|
|
251
|
+
name?: string | undefined;
|
|
252
|
+
url?: string | undefined;
|
|
253
|
+
email?: string | undefined;
|
|
254
|
+
} | undefined;
|
|
255
|
+
version?: string | undefined;
|
|
256
|
+
summary?: string | undefined;
|
|
257
|
+
license?: {
|
|
258
|
+
name?: string | undefined;
|
|
259
|
+
url?: string | undefined;
|
|
260
|
+
identifier?: string | undefined;
|
|
261
|
+
} | undefined;
|
|
262
|
+
} | undefined;
|
|
263
|
+
jsonSchemaDialect?: string | undefined;
|
|
264
|
+
servers?: {
|
|
265
|
+
url?: string | undefined;
|
|
266
|
+
description?: string | undefined;
|
|
267
|
+
variables?: Record<string, OpenAPIV3_1.ServerVariableObject> | undefined;
|
|
268
|
+
}[] | undefined;
|
|
269
|
+
components?: {
|
|
270
|
+
schemas?: Record<string, OpenAPIV3_1.SchemaObject> | undefined;
|
|
271
|
+
responses?: Record<string, OpenAPIV3_1.ReferenceObject | OpenAPIV3_1.ResponseObject> | undefined;
|
|
272
|
+
parameters?: Record<string, OpenAPIV3_1.ReferenceObject | OpenAPIV3_1.ParameterObject> | undefined;
|
|
273
|
+
examples?: Record<string, OpenAPIV3_1.ReferenceObject | OpenAPIV3_1.ExampleObject> | undefined;
|
|
274
|
+
requestBodies?: Record<string, OpenAPIV3_1.ReferenceObject | OpenAPIV3_1.RequestBodyObject> | undefined;
|
|
275
|
+
headers?: Record<string, OpenAPIV3_1.ReferenceObject | OpenAPIV3_1.HeaderObject> | undefined;
|
|
276
|
+
securitySchemes?: Record<string, OpenAPIV3_1.ReferenceObject | OpenAPIV3_1.SecuritySchemeObject> | undefined;
|
|
277
|
+
links?: Record<string, OpenAPIV3_1.ReferenceObject | OpenAPIV3_1.LinkObject> | undefined;
|
|
278
|
+
callbacks?: Record<string, OpenAPIV3_1.ReferenceObject | OpenAPIV3_1.CallbackObject> | undefined;
|
|
279
|
+
pathItems?: Record<string, OpenAPIV3_1.ReferenceObject | OpenAPIV3_1.PathItemObject> | undefined;
|
|
280
|
+
} | undefined;
|
|
281
|
+
webhooks?: Record<string, OpenAPIV3_1.PathItemObject | OpenAPIV3_1.ReferenceObject> | undefined;
|
|
282
|
+
paths?: OpenAPIV3_1.PathsObject<{}, {}> | undefined;
|
|
283
|
+
} | null>;
|
|
284
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
30
285
|
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
31
286
|
export default _default;
|
|
32
287
|
type __VLS_WithSlots<T, S> = T & {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApiReference.vue.d.ts","sourceRoot":"","sources":["../../src/components/ApiReference.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ApiReference.vue.d.ts","sourceRoot":"","sources":["../../src/components/ApiReference.vue"],"names":[],"mappings":"AAwnCA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAGxD,OAAO,EAEL,KAAK,4BAA4B,EAGlC,MAAM,6BAA6B,CAAA;AAoDpC,KAAK,WAAW,GAAG;IACjB;;;OAGG;IACH,aAAa,CAAC,EAAE,4BAA4B,CAAA;CAC7C,CAAC;AAGF,KAAK,WAAW,GAAG;IACjB,eAAe,CAAC,IAAI;QAAE,UAAU,EAAE,MAAM,CAAA;KAAE,CAAA;IAC1C,aAAa,CAAC,IAAI;QAAE,UAAU,EAAE,MAAM,CAAA;KAAE,CAAA;IACxC,eAAe,CAAC,IAAI;QAAE,UAAU,EAAE,MAAM,CAAA;KAAE,CAAA;IAC1C,aAAa,CAAC,IAAI;QAAE,UAAU,EAAE,MAAM,CAAA;KAAE,CAAA;IACxC,oBAAoB,CAAC,IAAI;QAAE,UAAU,EAAE,MAAM,CAAA;KAAE,CAAA;IAC/C,MAAM,CAAC,IAAI;QAAE,UAAU,EAAE,MAAM,CAAA;KAAE,CAAA;CAClC,CAAC;AAgtCF,QAAA,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oPAOnB,CAAC;wBACkB,eAAe,CAAC,OAAO,eAAe,EAAE,WAAW,CAAC;AAAzE,wBAA0E;AAQ1E,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -4,7 +4,7 @@ import _sfc_main from "./ApiReference.vue2.js";
|
|
|
4
4
|
/* empty css */
|
|
5
5
|
/* empty css */
|
|
6
6
|
import _export_sfc from "../_virtual/_plugin-vue_export-helper.js";
|
|
7
|
-
const ApiReference = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
7
|
+
const ApiReference = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-cc258b2c"]]);
|
|
8
8
|
export {
|
|
9
9
|
ApiReference as default
|
|
10
10
|
};
|
|
@@ -4,7 +4,7 @@ import { OpenApiClientButton } from "@scalar/api-client/components";
|
|
|
4
4
|
import { LAYOUT_SYMBOL } from "@scalar/api-client/hooks";
|
|
5
5
|
import { addScalarClassesToHeadless, ScalarSidebarFooter, ScalarColorModeToggleButton, ScalarColorModeToggleIcon } from "@scalar/components";
|
|
6
6
|
import { redirectToProxy } from "@scalar/oas-utils/helpers";
|
|
7
|
-
import { dereference } from "@scalar/openapi-parser";
|
|
7
|
+
import { dereference, upgrade } from "@scalar/openapi-parser";
|
|
8
8
|
import { createSidebarState, ScalarSidebar } from "@scalar/sidebar";
|
|
9
9
|
import { hasObtrusiveScrollbars, getThemeStyles } from "@scalar/themes";
|
|
10
10
|
import { apiReferenceConfigurationSchema } from "@scalar/types/api-reference";
|
|
@@ -49,7 +49,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
49
49
|
props: {
|
|
50
50
|
configuration: {}
|
|
51
51
|
},
|
|
52
|
-
setup(__props) {
|
|
52
|
+
setup(__props, { expose: __expose }) {
|
|
53
53
|
const props = __props;
|
|
54
54
|
const eventBus = createWorkspaceEventBus({ debug: false });
|
|
55
55
|
if (typeof window !== "undefined") {
|
|
@@ -261,13 +261,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
261
261
|
syncSlugAndUrlWithDocument(slug, elementId, config);
|
|
262
262
|
const isFirstLoad = !workspaceStore.workspace.documents[slug];
|
|
263
263
|
if (isFirstLoad) {
|
|
264
|
-
const proxy = (input, init) => fetch(
|
|
265
|
-
redirectToProxy(
|
|
266
|
-
config.proxyUrl ?? "https://proxy.scalar.com",
|
|
267
|
-
input.toString()
|
|
268
|
-
),
|
|
269
|
-
init
|
|
270
|
-
);
|
|
264
|
+
const proxy = (input, init) => fetch(redirectToProxy(config.proxyUrl, input.toString()), init);
|
|
271
265
|
await workspaceStore.addDocument(
|
|
272
266
|
normalized.source.url ? {
|
|
273
267
|
name: slug,
|
|
@@ -291,7 +285,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
291
285
|
}
|
|
292
286
|
}
|
|
293
287
|
const raw = JSON.parse(workspaceStore.exportActiveDocument("json") ?? "{}");
|
|
294
|
-
|
|
288
|
+
const { schema } = dereference(upgrade(raw).specification);
|
|
289
|
+
if (!schema) {
|
|
290
|
+
dereferenced.value = null;
|
|
291
|
+
return;
|
|
292
|
+
}
|
|
293
|
+
dereferenced.value = schema;
|
|
295
294
|
};
|
|
296
295
|
watch(
|
|
297
296
|
() => Object.values(configList.value),
|
|
@@ -302,10 +301,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
302
301
|
}
|
|
303
302
|
if (updated.source.url && updated.source.url !== previous?.source.url) {
|
|
304
303
|
const proxy = (input, init) => fetch(
|
|
305
|
-
redirectToProxy(
|
|
306
|
-
updated.config.proxyUrl ?? "https://proxy.scalar.com",
|
|
307
|
-
input.toString()
|
|
308
|
-
),
|
|
304
|
+
redirectToProxy(updated.config.proxyUrl, input.toString()),
|
|
309
305
|
init
|
|
310
306
|
);
|
|
311
307
|
await workspaceStore.addDocument({
|
|
@@ -355,6 +351,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
355
351
|
)
|
|
356
352
|
);
|
|
357
353
|
const dereferenced = ref(null);
|
|
354
|
+
__expose({
|
|
355
|
+
dereferenced
|
|
356
|
+
});
|
|
358
357
|
const modal = useTemplateRef("modal");
|
|
359
358
|
const documentUrl = computed(() => {
|
|
360
359
|
return configList.value[activeSlug.value]?.source?.url;
|
|
@@ -391,10 +390,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
391
390
|
return;
|
|
392
391
|
}
|
|
393
392
|
const result = await fetch(
|
|
394
|
-
redirectToProxy(
|
|
395
|
-
mergedConfig.value.proxyUrl ?? "https://proxy.scalar.com",
|
|
396
|
-
url
|
|
397
|
-
)
|
|
393
|
+
redirectToProxy(mergedConfig.value.proxyUrl, url)
|
|
398
394
|
).then((r) => r.text());
|
|
399
395
|
downloadDocument(result, activeSlug.value ?? "openapi");
|
|
400
396
|
return;
|