@scalar/api-reference 1.31.7 → 1.31.9
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 +55 -0
- package/dist/browser/standalone.js +18613 -18470
- package/dist/browser/webpack-stats.json +1 -1
- package/dist/components/ApiReference.vue.d.ts.map +1 -1
- package/dist/components/ApiReference.vue.js +10 -30
- package/dist/components/ApiReferenceLayout.vue.d.ts.map +1 -1
- package/dist/components/ApiReferenceLayout.vue.js +2 -2
- package/dist/components/ApiReferenceLayout.vue2.js +240 -222
- package/dist/components/Content/Content.vue.d.ts +2 -0
- package/dist/components/Content/Content.vue.d.ts.map +1 -1
- package/dist/components/Content/Content.vue.js +2 -2
- package/dist/components/Content/Content.vue2.js +84 -74
- package/dist/components/Content/Introduction/Introduction.vue.d.ts +1 -3
- package/dist/components/Content/Introduction/Introduction.vue.d.ts.map +1 -1
- package/dist/components/Content/Introduction/Introduction.vue.js +2 -2
- package/dist/components/Content/Introduction/Introduction.vue2.js +93 -83
- package/dist/components/Content/Lazy/Loading.vue.d.ts.map +1 -1
- package/dist/components/Content/Lazy/Loading.vue.js +84 -86
- package/dist/components/Content/Models/Models.vue.js +1 -1
- package/dist/components/Content/Models/Models.vue2.js +4 -4
- 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 +53 -53
- package/dist/components/Content/Schema/SchemaDiscriminator.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaDiscriminator.vue.js +1 -1
- 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 +117 -112
- 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 +161 -191
- package/dist/components/Content/Schema/helpers/schema-name.d.ts +13 -0
- package/dist/components/Content/Schema/helpers/schema-name.d.ts.map +1 -1
- package/dist/components/Content/Schema/helpers/schema-name.js +59 -13
- package/dist/components/Content/Tag/OperationsList.vue.d.ts.map +1 -1
- package/dist/components/Content/Tag/OperationsList.vue.js +1 -1
- package/dist/components/Content/Tag/OperationsList.vue2.js +22 -25
- package/dist/components/Content/Tag/OperationsListItem.vue.d.ts +2 -3
- package/dist/components/Content/Tag/OperationsListItem.vue.d.ts.map +1 -1
- package/dist/components/Content/Tag/OperationsListItem.vue.js +2 -2
- package/dist/components/Content/Tag/OperationsListItem.vue2.js +46 -47
- package/dist/components/Content/Tag/Tag.vue.d.ts.map +1 -1
- package/dist/components/Content/Tag/Tag.vue.js +45 -47
- package/dist/components/Content/Tag/TagList.vue.d.ts +2 -0
- package/dist/components/Content/Tag/TagList.vue.d.ts.map +1 -1
- package/dist/components/Content/Tag/TagList.vue.js +40 -41
- package/dist/components/Content/Tag/TagSection.vue.d.ts.map +1 -1
- package/dist/components/Content/Tag/TagSection.vue.js +2 -2
- package/dist/components/Content/Tag/TagSection.vue2.js +21 -21
- package/dist/components/HttpMethod/HttpMethod.vue.d.ts +16 -1
- package/dist/components/HttpMethod/HttpMethod.vue.d.ts.map +1 -1
- package/dist/components/HttpMethod/HttpMethod.vue.js +12 -11
- package/dist/components/MobileHeader.vue.d.ts +1 -8
- package/dist/components/MobileHeader.vue.d.ts.map +1 -1
- package/dist/components/MobileHeader.vue.js +1 -1
- package/dist/components/MobileHeader.vue2.js +19 -19
- package/dist/components/Section/Section.vue.js +2 -2
- package/dist/components/Section/Section.vue2.js +1 -1
- package/dist/components/ShowMoreButton.vue.js +2 -2
- package/dist/components/ShowMoreButton.vue2.js +1 -1
- package/dist/components/Sidebar/Sidebar.vue.d.ts +2 -4
- package/dist/components/Sidebar/Sidebar.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/Sidebar.vue.js +1 -1
- package/dist/components/Sidebar/Sidebar.vue2.js +113 -159
- package/dist/components/Sidebar/SidebarElement.vue.d.ts +2 -11
- package/dist/components/Sidebar/SidebarElement.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarElement.vue.js +2 -2
- package/dist/components/Sidebar/SidebarElement.vue2.js +85 -81
- package/dist/components/Sidebar/SidebarHttpBadge.vue.d.ts +16 -1
- package/dist/components/Sidebar/SidebarHttpBadge.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarHttpBadge.vue.js +2 -2
- package/dist/components/Sidebar/SidebarHttpBadge.vue2.js +11 -5
- package/dist/features/ApiClientModal/ApiClientModal.vue.d.ts.map +1 -1
- package/dist/features/ApiClientModal/ApiClientModal.vue.js +54 -42
- package/dist/features/ApiClientModal/useApiClient.d.ts +74 -72
- package/dist/features/ApiClientModal/useApiClient.d.ts.map +1 -1
- package/dist/features/DocumentSource/hooks/useDocumentSource.d.ts +0 -2
- package/dist/features/DocumentSource/hooks/useDocumentSource.d.ts.map +1 -1
- package/dist/features/DocumentSource/hooks/useDocumentSource.js +40 -67
- package/dist/features/DownloadLink/DownloadLink.vue.js +1 -1
- package/dist/features/ExampleRequest/ExampleRequest.vue.d.ts +5 -5
- package/dist/features/ExampleRequest/ExampleRequest.vue.d.ts.map +1 -1
- package/dist/features/ExampleRequest/ExampleRequest.vue.js +1 -1
- package/dist/features/ExampleRequest/ExampleRequest.vue2.js +200 -179
- package/dist/features/Operation/Operation.vue.d.ts +0 -1
- package/dist/features/Operation/Operation.vue.d.ts.map +1 -1
- package/dist/features/Operation/Operation.vue.js +31 -34
- package/dist/features/Operation/components/OperationParameters.vue.d.ts +3 -2
- package/dist/features/Operation/components/OperationParameters.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/OperationParameters.vue.js +62 -64
- package/dist/features/Operation/components/OperationResponses.vue.d.ts +1 -2
- package/dist/features/Operation/components/OperationResponses.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/OperationResponses.vue.js +2 -2
- 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 +31 -38
- package/dist/features/Operation/hooks/useResponses.d.ts +3 -3
- package/dist/features/Operation/hooks/useResponses.d.ts.map +1 -1
- package/dist/features/Operation/hooks/useResponses.js +12 -13
- package/dist/features/Operation/index.d.ts +0 -1
- package/dist/features/Operation/index.d.ts.map +1 -1
- package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts +4 -6
- 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 +85 -72
- package/dist/features/Operation/layouts/ModernLayout.vue.d.ts +2 -4
- 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 +114 -98
- package/dist/features/Search/SearchModal.vue.js +2 -2
- package/dist/features/Search/SearchModal.vue2.js +1 -1
- package/dist/features/Search/useSearchIndex.d.ts.map +1 -1
- package/dist/features/Search/useSearchIndex.js +61 -64
- package/dist/features/sidebar/helpers/create-sidebar.d.ts +4 -2
- package/dist/features/sidebar/helpers/create-sidebar.d.ts.map +1 -1
- package/dist/features/sidebar/helpers/create-sidebar.js +33 -0
- package/dist/features/sidebar/hooks/useSidebar.d.ts +2 -3
- package/dist/features/sidebar/hooks/useSidebar.d.ts.map +1 -1
- package/dist/features/sidebar/hooks/useSidebar.js +18 -0
- package/dist/features/sidebar/index.d.ts +2 -1
- package/dist/features/sidebar/index.d.ts.map +1 -1
- package/dist/features/traverse-schema/helpers/get-tag.d.ts +4 -2
- package/dist/features/traverse-schema/helpers/get-tag.d.ts.map +1 -1
- package/dist/features/traverse-schema/helpers/get-tag.js +7 -0
- package/dist/features/traverse-schema/helpers/traverse-description.js +33 -0
- package/dist/features/traverse-schema/helpers/traverse-document.d.ts.map +1 -1
- package/dist/features/traverse-schema/helpers/traverse-document.js +34 -0
- package/dist/features/traverse-schema/helpers/traverse-paths.d.ts +5 -3
- package/dist/features/traverse-schema/helpers/traverse-paths.d.ts.map +1 -1
- package/dist/features/traverse-schema/helpers/traverse-paths.js +32 -0
- package/dist/features/traverse-schema/helpers/traverse-schemas.d.ts +2 -2
- package/dist/features/traverse-schema/helpers/traverse-schemas.d.ts.map +1 -1
- package/dist/features/traverse-schema/helpers/traverse-schemas.js +23 -0
- package/dist/features/traverse-schema/helpers/traverse-tags.d.ts +2 -2
- package/dist/features/traverse-schema/helpers/traverse-tags.d.ts.map +1 -1
- package/dist/features/traverse-schema/helpers/traverse-tags.js +43 -0
- package/dist/features/traverse-schema/helpers/traverse-webhooks.d.ts +2 -2
- package/dist/features/traverse-schema/helpers/traverse-webhooks.d.ts.map +1 -1
- package/dist/features/traverse-schema/helpers/traverse-webhooks.js +26 -0
- package/dist/features/traverse-schema/index.d.ts +3 -3
- package/dist/features/traverse-schema/index.d.ts.map +1 -1
- package/dist/features/traverse-schema/types.d.ts +8 -5
- package/dist/features/traverse-schema/types.d.ts.map +1 -1
- package/dist/helpers/parse.d.ts +2 -1
- package/dist/helpers/parse.d.ts.map +1 -1
- package/dist/helpers/parse.js +72 -88
- package/dist/hooks/useMultipleDocuments.d.ts +6 -6
- package/dist/hooks/useMultipleDocuments.d.ts.map +1 -1
- package/dist/hooks/useNavState.d.ts +1 -1
- package/dist/hooks/useNavState.d.ts.map +1 -1
- package/dist/hooks/useNavState.js +14 -9
- package/dist/hooks/useOperation.d.ts +7 -7
- package/dist/hooks/useOperation.d.ts.map +1 -1
- package/dist/hooks/useOperation.js +13 -12
- package/dist/index.d.ts +0 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +23 -25
- package/dist/legacy/fixtures/index.d.ts +1 -1
- package/dist/libs/openapi.d.ts +3 -4
- package/dist/libs/openapi.d.ts.map +1 -1
- package/dist/libs/openapi.js +8 -9
- package/dist/style.css +1 -1
- package/dist/v2/ApiReferenceWorkspace.vue.d.ts +4 -18
- package/dist/v2/ApiReferenceWorkspace.vue.d.ts.map +1 -1
- package/dist/v2/ApiReferenceWorkspace.vue.js +68 -45
- package/package.json +17 -17
- package/dist/components/Content/Webhooks/index.d.ts +0 -2
- package/dist/components/Content/Webhooks/index.d.ts.map +0 -1
- package/dist/features/Operation/Webhooks.vue.d.ts +0 -7
- package/dist/features/Operation/Webhooks.vue.d.ts.map +0 -1
- package/dist/features/Operation/Webhooks.vue.js +0 -7
- package/dist/features/Operation/Webhooks.vue2.js +0 -121
- package/dist/features/Operation/components/Webhook.vue.d.ts +0 -7
- package/dist/features/Operation/components/Webhook.vue.d.ts.map +0 -1
- package/dist/features/Operation/components/Webhook.vue.js +0 -7
- package/dist/features/Operation/components/Webhook.vue2.js +0 -29
- package/dist/features/traverse-schema/helpers/operation-id-params.d.ts +0 -8
- package/dist/features/traverse-schema/helpers/operation-id-params.d.ts.map +0 -1
- package/dist/features/traverse-schema/helpers/operation-id-params.js +0 -8
- package/dist/hooks/useSidebar.d.ts +0 -53
- package/dist/hooks/useSidebar.d.ts.map +0 -1
- package/dist/hooks/useSidebar.js +0 -248
- package/dist/legacy/fixtures/httpRequestMethods.js +0 -14
|
@@ -2,6 +2,11 @@ import type { ApiReferenceConfiguration } from '@scalar/types/api-reference';
|
|
|
2
2
|
import type { UseNavState } from '../../hooks/useNavState.js';
|
|
3
3
|
import type { Ref } from 'vue';
|
|
4
4
|
import type { OpenAPIV3_1 } from '@scalar/openapi-types';
|
|
5
|
+
/** Map of tagNames and their entries */
|
|
6
|
+
export type TagsMap = Map<string, {
|
|
7
|
+
tag: OpenAPIV3_1.TagObject;
|
|
8
|
+
entries: TraversedEntry[];
|
|
9
|
+
}>;
|
|
5
10
|
/** Description entry returned form traversing the document */
|
|
6
11
|
export type TraversedDescription = {
|
|
7
12
|
id: string;
|
|
@@ -27,10 +32,10 @@ export type TraversedSchema = {
|
|
|
27
32
|
export type TraversedTag = {
|
|
28
33
|
id: string;
|
|
29
34
|
title: string;
|
|
30
|
-
|
|
31
|
-
children?: TraversedEntry[];
|
|
35
|
+
children: TraversedEntry[];
|
|
32
36
|
tag: OpenAPIV3_1.TagObject;
|
|
33
37
|
isGroup: boolean;
|
|
38
|
+
isWebhooks?: boolean;
|
|
34
39
|
};
|
|
35
40
|
/** Webhook entry returned form traversing the document, basically the same as an operaation but with name instead of path */
|
|
36
41
|
export type TraversedWebhook = {
|
|
@@ -42,10 +47,8 @@ export type TraversedWebhook = {
|
|
|
42
47
|
};
|
|
43
48
|
/** Entries returned form traversing the document */
|
|
44
49
|
export type TraversedEntry = TraversedDescription | TraversedOperation | TraversedSchema | TraversedTag | TraversedWebhook;
|
|
45
|
-
/**
|
|
50
|
+
/** Options for traversing the spec */
|
|
46
51
|
export type TraverseSpecOptions = {
|
|
47
52
|
config: Ref<ApiReferenceConfiguration>;
|
|
48
|
-
/** You can optionally pass in these refs in case you need them before the hook is instantiated */
|
|
49
|
-
isSidebarOpen?: Ref<boolean>;
|
|
50
53
|
} & Pick<UseNavState, 'getHeadingId' | 'getModelId' | 'getOperationId' | 'getSectionId' | 'getTagId' | 'getWebhookId'>;
|
|
51
54
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/features/traverse-schema/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAA;AAE5E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA;AACtD,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,KAAK,CAAA;AAC9B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAExD,8DAA8D;AAC9D,MAAM,MAAM,oBAAoB,GAAG;IACjC,EAAE,E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gB,GAAG,cAAc,GAAG,UAAU,GAAG,cAAc,CAAC,CAAA"}
|
package/dist/helpers/parse.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import type { OpenAPIV3_1 } from '@scalar/openapi-types';
|
|
2
2
|
import type { Spec } from '@scalar/types/legacy';
|
|
3
|
+
import type { TraversedEntry } from '../features/traverse-schema';
|
|
3
4
|
/**
|
|
4
5
|
* Parse the given dereferencedDocument and return a super custom transformed dereferencedDocument.
|
|
5
6
|
*
|
|
6
7
|
* @deprecated Try to use a store instead.
|
|
7
8
|
*/
|
|
8
|
-
export declare const parse: (dereferencedDocument: OpenAPIV3_1.Document) => Promise<Spec>;
|
|
9
|
+
export declare const parse: (dereferencedDocument: OpenAPIV3_1.Document, items?: TraversedEntry[]) => Promise<Spec>;
|
|
9
10
|
//# sourceMappingURL=parse.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parse.d.ts","sourceRoot":"","sources":["../../src/helpers/parse.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"parse.d.ts","sourceRoot":"","sources":["../../src/helpers/parse.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AACxD,OAAO,KAAK,EAAE,IAAI,EAAwB,MAAM,sBAAsB,CAAA;AAGtE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAA;AAKhE;;;;GAIG;AACH,eAAO,MAAM,KAAK,yBAA0B,WAAW,CAAC,QAAQ,UAAU,cAAc,EAAE,KAAG,OAAO,CAAC,IAAI,CAiBrG,CAAA"}
|
package/dist/helpers/parse.js
CHANGED
|
@@ -1,97 +1,81 @@
|
|
|
1
|
-
import { shouldIgnoreEntity as m } from "@scalar/oas-utils/helpers";
|
|
2
1
|
import { createEmptySpecification as w } from "../libs/openapi.js";
|
|
3
|
-
import { normalizeHttpMethod as
|
|
4
|
-
|
|
5
|
-
const C = (c) => new Promise(async (t, p) => {
|
|
2
|
+
import { normalizeHttpMethod as m } from "@scalar/helpers/http/normalize-http-method";
|
|
3
|
+
const I = (s, i) => new Promise((e, b) => {
|
|
6
4
|
try {
|
|
7
|
-
return
|
|
8
|
-
} catch (
|
|
9
|
-
console.error("[@scalar/api-reference]", "Failed to parse the OpenAPI document. It might be invalid?"), console.error(
|
|
5
|
+
return e(s ? k(s, i) : k(w()));
|
|
6
|
+
} catch (p) {
|
|
7
|
+
console.error("[@scalar/api-reference]", "Failed to parse the OpenAPI document. It might be invalid?"), console.error(p), b(p);
|
|
10
8
|
}
|
|
11
|
-
return
|
|
12
|
-
}),
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
information: {
|
|
43
|
-
...e
|
|
44
|
-
}
|
|
45
|
-
};
|
|
46
|
-
}
|
|
9
|
+
return e(k(w()));
|
|
10
|
+
}), k = (s, i) => {
|
|
11
|
+
let e = {};
|
|
12
|
+
s && typeof s == "object" ? e = s : e = w(), e.tags || (e.tags = []), e.paths || (e.paths = {}), e.components || (e.components = {}), e.webhooks || (e.webhooks = {}), e.servers || (e.servers = []), e.security || (e.security = []);
|
|
13
|
+
const b = [], p = (o) => {
|
|
14
|
+
var h;
|
|
15
|
+
!("children" in o) || !((h = o.children) != null && h.length) || o.children.forEach((a) => {
|
|
16
|
+
var f, u, t, n, g;
|
|
17
|
+
let r = (f = e.tags) == null ? void 0 : f.findIndex((d) => "tag" in o && d.name === o.tag.name);
|
|
18
|
+
r === -1 && "tag" in o && (e.tags.push({
|
|
19
|
+
name: o.tag.name,
|
|
20
|
+
operations: []
|
|
21
|
+
}), r = e.tags.length - 1), e.tags[r].operations ||= [], "tag" in a ? p(a) : "operation" in a ? e.tags[r].operations.push({
|
|
22
|
+
id: a.id,
|
|
23
|
+
httpVerb: m(a.method),
|
|
24
|
+
path: a.path,
|
|
25
|
+
name: a.operation.summary || a.path || "",
|
|
26
|
+
description: a.operation.description || "",
|
|
27
|
+
isWebhook: !1,
|
|
28
|
+
information: a.operation,
|
|
29
|
+
pathParameters: (t = (u = e.paths) == null ? void 0 : u[a.path ?? ""]) == null ? void 0 : t.parameters
|
|
30
|
+
}) : "webhook" in a && e.tags[r].operations.push({
|
|
31
|
+
id: a.id,
|
|
32
|
+
httpVerb: m(a.method),
|
|
33
|
+
path: a.name,
|
|
34
|
+
name: a.webhook.summary || a.name || "",
|
|
35
|
+
description: a.webhook.description || "",
|
|
36
|
+
isWebhook: !0,
|
|
37
|
+
information: a.webhook,
|
|
38
|
+
pathParameters: (g = (n = e.webhooks) == null ? void 0 : n[a.name ?? ""]) == null ? void 0 : g.parameters
|
|
39
|
+
});
|
|
47
40
|
});
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
var k, x, j;
|
|
81
|
-
const f = (k = t.tags) == null ? void 0 : k.findIndex((R) => R.name === i);
|
|
82
|
-
f === -1 && ((x = t.tags) == null || x.push({
|
|
83
|
-
name: i,
|
|
84
|
-
description: ""
|
|
85
|
-
}));
|
|
86
|
-
const I = f !== -1 ? f : t.tags.length - 1;
|
|
87
|
-
typeof ((j = t.tags[I]) == null ? void 0 : j.operations) > "u" && (t.tags[I].operations = []), t.tags[I].operations.push(n);
|
|
88
|
-
});
|
|
41
|
+
};
|
|
42
|
+
return i == null || i.forEach((o) => {
|
|
43
|
+
var h, a, r, f, u;
|
|
44
|
+
if (o.id.startsWith("tag/default") && "operation" in o) {
|
|
45
|
+
let t = (h = e.tags) == null ? void 0 : h.findIndex((n) => n.name === "default");
|
|
46
|
+
t === -1 && (e.tags.push({
|
|
47
|
+
name: "default",
|
|
48
|
+
description: "",
|
|
49
|
+
operations: []
|
|
50
|
+
}), t = e.tags.length - 1), e.tags[t].operations.push({
|
|
51
|
+
id: o.id,
|
|
52
|
+
httpVerb: m(o.method),
|
|
53
|
+
path: o.path,
|
|
54
|
+
name: o.operation.summary || o.path || "",
|
|
55
|
+
description: o.operation.description || "",
|
|
56
|
+
isWebhook: !1,
|
|
57
|
+
information: o.operation,
|
|
58
|
+
pathParameters: (r = (a = e.paths) == null ? void 0 : a[o.path ?? ""]) == null ? void 0 : r.parameters
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
"tag" in o && o.isGroup && ((f = o.children) != null && f.length) && o.children.forEach(p), "tag" in o && p(o), "isWebhooks" in o && o.isWebhooks && ((u = o.children) != null && u.length) && o.children.forEach((t) => {
|
|
62
|
+
var n, g;
|
|
63
|
+
"webhook" in t && t.name && t.method && b.push({
|
|
64
|
+
id: t.id,
|
|
65
|
+
httpVerb: m(t.method),
|
|
66
|
+
path: t.name,
|
|
67
|
+
name: t.webhook.summary || t.name || "",
|
|
68
|
+
description: t.webhook.description || "",
|
|
69
|
+
isWebhook: !0,
|
|
70
|
+
information: t.webhook,
|
|
71
|
+
pathParameters: (g = (n = e.webhooks) == null ? void 0 : n[t.name ?? ""]) == null ? void 0 : g.parameters
|
|
72
|
+
});
|
|
89
73
|
});
|
|
90
|
-
}),
|
|
91
|
-
...
|
|
92
|
-
webhooks:
|
|
74
|
+
}), {
|
|
75
|
+
...e,
|
|
76
|
+
webhooks: b
|
|
93
77
|
};
|
|
94
78
|
};
|
|
95
79
|
export {
|
|
96
|
-
|
|
80
|
+
I as parse
|
|
97
81
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { NavState } from '../hooks/useNavState.js';
|
|
2
|
-
import { type AnyApiReferenceConfiguration, type SpecConfiguration } from '@scalar/types/api-reference';
|
|
2
|
+
import { type AnyApiReferenceConfiguration, type ApiReferenceConfiguration, type SpecConfiguration } from '@scalar/types/api-reference';
|
|
3
3
|
import { type Ref } from 'vue';
|
|
4
4
|
type UseMultipleDocumentsProps = {
|
|
5
5
|
/**
|
|
@@ -14,13 +14,13 @@ type UseMultipleDocumentsProps = {
|
|
|
14
14
|
* Take any configuration and return a flat array of configurations.
|
|
15
15
|
*/
|
|
16
16
|
export declare const normalizeConfigurations: (configuration: AnyApiReferenceConfiguration | undefined) => SpecConfiguration[];
|
|
17
|
-
export declare const useMultipleDocuments: ({ configuration, initialIndex, isIntersectionEnabled, hash, hashPrefix, }: UseMultipleDocumentsProps) =>
|
|
18
17
|
/**
|
|
19
|
-
* This
|
|
20
|
-
*
|
|
18
|
+
* DEPRECATED: This is a temporary state solution while we migrate to the new workspace store
|
|
19
|
+
*
|
|
20
|
+
* @deprecated
|
|
21
21
|
*/
|
|
22
|
-
{
|
|
23
|
-
selectedConfiguration: Ref<SpecConfiguration>;
|
|
22
|
+
export declare const useMultipleDocuments: ({ configuration, initialIndex, isIntersectionEnabled, hash, hashPrefix, }: UseMultipleDocumentsProps) => {
|
|
23
|
+
selectedConfiguration: Ref<Partial<ApiReferenceConfiguration> & SpecConfiguration>;
|
|
24
24
|
availableDocuments: Ref<SpecConfiguration[]>;
|
|
25
25
|
selectedDocumentIndex: Ref<number>;
|
|
26
26
|
isIntersectionEnabled: Ref<boolean>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useMultipleDocuments.d.ts","sourceRoot":"","sources":["../../src/hooks/useMultipleDocuments.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAA;AAEnD,OAAO,EACL,KAAK,4BAA4B,EACjC,KAAK,iBAAiB,EAEvB,MAAM,6BAA6B,CAAA;AAGpC,OAAO,EAAE,KAAK,GAAG,EAAwB,MAAM,KAAK,CAAA;AAKpD,KAAK,yBAAyB,GAAG;IAC/B;;;OAGG;IACH,aAAa,EAAE,GAAG,CAAC,4BAA4B,GAAG,SAAS,CAAC,CAAA;IAC5D,2FAA2F;IAC3F,YAAY,CAAC,EAAE,MAAM,CAAA;CACtB,GAAG,QAAQ,CAAA;AAIZ;;GAEG;AACH,eAAO,MAAM,uBAAuB,kBACnB,4BAA4B,GAAG,SAAS,KACtD,iBAAiB,EA6BnB,CAAA;AA0CD,eAAO,MAAM,oBAAoB,8EAM9B,yBAAyB;
|
|
1
|
+
{"version":3,"file":"useMultipleDocuments.d.ts","sourceRoot":"","sources":["../../src/hooks/useMultipleDocuments.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAA;AAEnD,OAAO,EACL,KAAK,4BAA4B,EACjC,KAAK,yBAAyB,EAC9B,KAAK,iBAAiB,EAEvB,MAAM,6BAA6B,CAAA;AAGpC,OAAO,EAAE,KAAK,GAAG,EAAwB,MAAM,KAAK,CAAA;AAKpD,KAAK,yBAAyB,GAAG;IAC/B;;;OAGG;IACH,aAAa,EAAE,GAAG,CAAC,4BAA4B,GAAG,SAAS,CAAC,CAAA;IAC5D,2FAA2F;IAC3F,YAAY,CAAC,EAAE,MAAM,CAAA;CACtB,GAAG,QAAQ,CAAA;AAIZ;;GAEG;AACH,eAAO,MAAM,uBAAuB,kBACnB,4BAA4B,GAAG,SAAS,KACtD,iBAAiB,EA6BnB,CAAA;AA0CD;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,8EAM9B,yBAAyB,KAAG;IAC7B,qBAAqB,EAAE,GAAG,CAAC,OAAO,CAAC,yBAAyB,CAAC,GAAG,iBAAiB,CAAC,CAAA;IAClF,kBAAkB,EAAE,GAAG,CAAC,iBAAiB,EAAE,CAAC,CAAA;IAC5C,qBAAqB,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;IAClC,qBAAqB,EAAE,GAAG,CAAC,OAAO,CAAC,CAAA;IACnC,IAAI,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;IACjB,UAAU,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;CAmIxB,CAAA"}
|
|
@@ -48,7 +48,7 @@ export declare const useNavState: (_config?: Ref<ApiReferenceConfiguration>) =>
|
|
|
48
48
|
}, parentTag?: OpenAPIV3_1.TagObject) => string;
|
|
49
49
|
getModelId: (model?: {
|
|
50
50
|
name: string;
|
|
51
|
-
}) => string;
|
|
51
|
+
}, parentTag?: OpenAPIV3_1.TagObject) => string;
|
|
52
52
|
getHeadingId: (heading: Heading) => string;
|
|
53
53
|
getOperationId: (operation: {
|
|
54
54
|
path: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useNavState.d.ts","sourceRoot":"","sources":["../../src/hooks/useNavState.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAA;AAC5E,OAAO,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAA;AAEhE,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,GAAG,EAAe,MAAM,KAAK,CAAA;AAE9D,MAAM,MAAM,QAAQ,GAAG;IACrB,0EAA0E;IAC1E,IAAI,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;IACjB,2CAA2C;IAC3C,UAAU,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;IACvB,sFAAsF;IACtF,qBAAqB,E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AAW,CAAC,WAAW,CAAA;KAChC,GAAG,WAAW,CAAC,eAAe,aACpB,WAAW,CAAC,SAAS;iCA7GE,MAAM;;oBAiGnB,WAAW,CAAC,SAAS;;;CA2E7C,CAAA;AAED,mCAAmC;AACnC,MAAM,MAAM,WAAW,GAAG,UAAU,CAAC,OAAO,WAAW,CAAC,CAAA"}
|
|
@@ -7,7 +7,7 @@ const P = Symbol(), U = l(!1), x = l(""), k = l(""), T = (f) => {
|
|
|
7
7
|
isIntersectionEnabled: U,
|
|
8
8
|
hash: x,
|
|
9
9
|
hashPrefix: k
|
|
10
|
-
}), t = f ?? b(),
|
|
10
|
+
}), t = f ?? b(), c = (e) => {
|
|
11
11
|
var a;
|
|
12
12
|
if (!t.value.pathRouting)
|
|
13
13
|
return "";
|
|
@@ -17,16 +17,21 @@ const P = Symbol(), U = l(!1), x = l(""), k = l(""), T = (f) => {
|
|
|
17
17
|
var h;
|
|
18
18
|
const n = (h = e.match(/(tag\/[^/]+)/)) == null ? void 0 : h[0], a = e.startsWith("model") ? "models" : "", o = e.startsWith("webhook") ? "webhooks" : "";
|
|
19
19
|
return n || a || o;
|
|
20
|
-
},
|
|
20
|
+
}, g = () => t.value.pathRouting ? c(window.location.pathname) : (
|
|
21
21
|
// Must remove the prefix from the hash as the internal hash value should be pure
|
|
22
22
|
decodeURIComponent(window.location.hash.replace(/^#/, "")).slice(u.value.length)
|
|
23
|
-
), m = () => r.value =
|
|
23
|
+
), m = () => r.value = g(), $ = (e, n = window.location.href) => {
|
|
24
24
|
const a = new URL(n);
|
|
25
25
|
t.value.pathRouting ? a.pathname = d(t.value.pathRouting.basePath, e) : a.hash = u.value + e, r.value = e, window.history.replaceState({}, "", a);
|
|
26
|
-
},
|
|
26
|
+
}, I = (e, n = window.location.href, a = window.location.search) => {
|
|
27
27
|
const o = new URL(n);
|
|
28
28
|
return t.value.pathRouting ? o.pathname = d(t.value.pathRouting.basePath, e) : o.hash = u.value + e, o.search = a, o.toString();
|
|
29
|
-
}, w = (e = r.value) => `${u.value}${e}`, S = (e) => typeof t.value.generateHeadingSlug == "function" ? `${t.value.generateHeadingSlug(e)}` : e.slug ? `description/${e.slug}` : "", R = (e
|
|
29
|
+
}, w = (e = r.value) => `${u.value}${e}`, S = (e) => typeof t.value.generateHeadingSlug == "function" ? `${t.value.generateHeadingSlug(e)}` : e.slug ? `description/${e.slug}` : "", R = (e, n) => {
|
|
30
|
+
if (!(e != null && e.name))
|
|
31
|
+
return "models";
|
|
32
|
+
const a = n ? `${s(n)}/` : "";
|
|
33
|
+
return typeof t.value.generateModelSlug == "function" ? `${a}model/${t.value.generateModelSlug(e)}` : `${a}model/${i(e.name)}`;
|
|
34
|
+
}, s = (e) => typeof t.value.generateTagSlug == "function" ? `tag/${t.value.generateTagSlug(e)}` : `tag/${i(e.name ?? "")}`;
|
|
30
35
|
return {
|
|
31
36
|
hash: r,
|
|
32
37
|
/** Sets the prefix for the hash */
|
|
@@ -45,13 +50,13 @@ const P = Symbol(), U = l(!1), x = l(""), k = l(""), T = (f) => {
|
|
|
45
50
|
* @param url The url to get the hashed url from
|
|
46
51
|
* @returns The hashed url
|
|
47
52
|
*/
|
|
48
|
-
getHashedUrl:
|
|
53
|
+
getHashedUrl: I,
|
|
49
54
|
/**
|
|
50
55
|
* Replaces the URL state with the new url and hash
|
|
51
56
|
* Replacement is used so that hash changes don't trigger the url hash watcher and cause a scroll
|
|
52
57
|
*/
|
|
53
|
-
replaceUrlState:
|
|
54
|
-
getReferenceId:
|
|
58
|
+
replaceUrlState: $,
|
|
59
|
+
getReferenceId: g,
|
|
55
60
|
getWebhookId: (e, n) => {
|
|
56
61
|
if (!(e != null && e.name))
|
|
57
62
|
return "webhooks";
|
|
@@ -66,7 +71,7 @@ const P = Symbol(), U = l(!1), x = l(""), k = l(""), T = (f) => {
|
|
|
66
71
|
method: e.method,
|
|
67
72
|
summary: e.summary
|
|
68
73
|
})}` : `${s(n)}/${e.method}${e.path}`,
|
|
69
|
-
getPathRoutingId:
|
|
74
|
+
getPathRoutingId: c,
|
|
70
75
|
getSectionId: v,
|
|
71
76
|
getTagId: s,
|
|
72
77
|
isIntersectionEnabled: p,
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { OpenAPIV3_1, TransformedOperation } from '@scalar/types/legacy';
|
|
2
2
|
export type ParamMap = {
|
|
3
|
-
path:
|
|
4
|
-
query:
|
|
5
|
-
header:
|
|
6
|
-
cookie:
|
|
7
|
-
body:
|
|
8
|
-
formData:
|
|
3
|
+
path: OpenAPIV3_1.ParameterObject[];
|
|
4
|
+
query: OpenAPIV3_1.ParameterObject[];
|
|
5
|
+
header: OpenAPIV3_1.ParameterObject[];
|
|
6
|
+
cookie: OpenAPIV3_1.ParameterObject[];
|
|
7
|
+
body: OpenAPIV3_1.ParameterObject[];
|
|
8
|
+
formData: OpenAPIV3_1.ParameterObject[];
|
|
9
9
|
};
|
|
10
10
|
/**
|
|
11
11
|
* This hook is used to generate the parameters for the request from the parameters in the swagger file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useOperation.d.ts","sourceRoot":"","sources":["../../src/hooks/useOperation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"useOperation.d.ts","sourceRoot":"","sources":["../../src/hooks/useOperation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAA;AAI7E,MAAM,MAAM,QAAQ,GAAG;IACrB,IAAI,EAAE,WAAW,CAAC,eAAe,EAAE,CAAA;IACnC,KAAK,EAAE,WAAW,CAAC,eAAe,EAAE,CAAA;IACpC,MAAM,EAAE,WAAW,CAAC,eAAe,EAAE,CAAA;IACrC,MAAM,EAAE,WAAW,CAAC,eAAe,EAAE,CAAA;IACrC,IAAI,EAAE,WAAW,CAAC,eAAe,EAAE,CAAA;IACnC,QAAQ,EAAE,WAAW,CAAC,eAAe,EAAE,CAAA;CACxC,CAAA;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,SAAS,EAAE,oBAAoB;;EA2D3D"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { isDereferenced as u } from "@scalar/openapi-types/helpers";
|
|
2
|
+
import { computed as n } from "vue";
|
|
3
|
+
function l(s) {
|
|
3
4
|
return {
|
|
4
|
-
parameterMap:
|
|
5
|
-
var
|
|
6
|
-
const
|
|
5
|
+
parameterMap: n(() => {
|
|
6
|
+
var h;
|
|
7
|
+
const o = {
|
|
7
8
|
path: [],
|
|
8
9
|
query: [],
|
|
9
10
|
header: [],
|
|
@@ -11,16 +12,16 @@ function e(o) {
|
|
|
11
12
|
body: [],
|
|
12
13
|
formData: []
|
|
13
14
|
};
|
|
14
|
-
|
|
15
|
-
i.in === "path" ?
|
|
15
|
+
s.pathParameters && s.pathParameters.forEach((i) => {
|
|
16
|
+
i.in === "path" ? o.path.push(i) : i.in === "query" ? o.query.push(i) : i.in === "header" ? o.header.push(i) : i.in === "cookie" ? o.cookie.push(i) : i.in === "body" ? o.body.push(i) : i.in === "formData" && o.formData.push(i);
|
|
16
17
|
});
|
|
17
|
-
const
|
|
18
|
-
return
|
|
19
|
-
i.in === "path" ?
|
|
20
|
-
}),
|
|
18
|
+
const f = ((h = s.information) == null ? void 0 : h.parameters) ?? [];
|
|
19
|
+
return f && f.forEach((i) => {
|
|
20
|
+
u(i) && (i.in === "path" ? o.path.push(i) : i.in === "query" ? o.query.push(i) : i.in === "header" ? o.header.push(i) : i.in === "cookie" ? o.cookie.push(i) : i.in === "body" ? o.body.push(i) : i.in === "formData" && o.formData.push(i));
|
|
21
|
+
}), o;
|
|
21
22
|
})
|
|
22
23
|
};
|
|
23
24
|
}
|
|
24
25
|
export {
|
|
25
|
-
|
|
26
|
+
l as useOperation
|
|
26
27
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -8,7 +8,6 @@ export { Card, CardHeader, CardContent, CardFooter, CardTabHeader, CardTab } fro
|
|
|
8
8
|
export { parse } from './helpers/parse.js';
|
|
9
9
|
export { createEmptySpecification } from './libs/openapi.js';
|
|
10
10
|
export { useNavState } from './hooks/useNavState.js';
|
|
11
|
-
export { useSidebar } from './hooks/useSidebar.js';
|
|
12
11
|
export { useHttpClientStore } from './stores/useHttpClientStore.js';
|
|
13
12
|
export type { ApiReferenceConfiguration, ReferenceProps, } from './types';
|
|
14
13
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,+BAA+B,CAAA;AACvE,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,qCAAqC,CAAA;AACnF,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAE7D,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,iCAAiC,CAAA;AAE3E,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAA;AAE9D,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAA;AAC9C,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,WAAW,EAAE,UAAU,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAA;AAGrG,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAA;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,gBAAgB,CAAA;AACzD,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA;AACjD,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,+BAA+B,CAAA;AACvE,OAAO,EAAE,O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