@scalar/api-reference 0.8.10 → 1.0.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 +34 -0
- package/README.md +8 -0
- package/dist/browser/standalone.js +81181 -81024
- package/dist/components/ApiClientModal.vue.d.ts +16 -4
- package/dist/components/ApiClientModal.vue.d.ts.map +1 -1
- package/dist/components/ApiReference.vue.d.ts +20 -22
- package/dist/components/ApiReference.vue.d.ts.map +1 -1
- package/dist/components/ApiReferenceLayout.vue.d.ts +178 -0
- package/dist/components/ApiReferenceLayout.vue.d.ts.map +1 -0
- package/dist/components/Content/Authentication/Authentication.vue.d.ts +2 -2
- package/dist/components/Content/Authentication/Authentication.vue.d.ts.map +1 -1
- package/dist/components/Content/Authentication/SecuritySchemeSelector.vue.d.ts.map +1 -1
- package/dist/components/Content/Content.vue.d.ts +9 -2
- package/dist/components/Content/Content.vue.d.ts.map +1 -1
- package/dist/components/Content/Introduction/Introduction.vue.d.ts.map +1 -1
- package/dist/components/Content/Introduction/ServerList.vue.d.ts.map +1 -1
- package/dist/components/Content/ReferenceEndpoint/ReferenceEndpoint.vue.d.ts +1 -17
- package/dist/components/Content/ReferenceEndpoint/ReferenceEndpoint.vue.d.ts.map +1 -1
- package/dist/components/DarkModeToggle.vue.d.ts +15 -1
- package/dist/components/DarkModeToggle.vue.d.ts.map +1 -1
- package/dist/components/FindAnythingButton.vue.d.ts +13 -1
- package/dist/components/FindAnythingButton.vue.d.ts.map +1 -1
- package/dist/components/MobileHeader.vue.d.ts +15 -1
- package/dist/components/MobileHeader.vue.d.ts.map +1 -1
- package/dist/components/SearchModal.vue.d.ts +2 -2
- package/dist/components/Sidebar.vue.d.ts +26 -4
- package/dist/components/Sidebar.vue.d.ts.map +1 -1
- package/dist/helpers/getUrlFromServerState.d.ts +1 -1
- package/dist/helpers/getUrlFromServerState.d.ts.map +1 -1
- package/dist/hooks/index.d.ts +2 -0
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/useParser.d.ts +163 -0
- package/dist/hooks/useParser.d.ts.map +1 -0
- package/dist/hooks/useSpec.d.ts +13 -0
- package/dist/hooks/useSpec.d.ts.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +36659 -19159
- package/dist/types.d.ts +13 -8
- package/dist/types.d.ts.map +1 -1
- package/package.json +21 -6
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
import { type ComputedRef, type Ref } from 'vue';
|
|
2
|
+
import type { Spec } from '../types';
|
|
3
|
+
/**
|
|
4
|
+
* Dereference OpenAPI/Swagger specs
|
|
5
|
+
*/
|
|
6
|
+
export declare function useParser({ input, }: {
|
|
7
|
+
input?: string | Ref<string> | ComputedRef<string>;
|
|
8
|
+
}): {
|
|
9
|
+
parsedSpecRef: {
|
|
10
|
+
tags: {
|
|
11
|
+
name: string;
|
|
12
|
+
description: string;
|
|
13
|
+
operations: {
|
|
14
|
+
httpVerb: string;
|
|
15
|
+
path: string;
|
|
16
|
+
operationId: string;
|
|
17
|
+
name: string;
|
|
18
|
+
description: string;
|
|
19
|
+
information: {
|
|
20
|
+
description: string;
|
|
21
|
+
operationId: string;
|
|
22
|
+
parameters: {
|
|
23
|
+
description?: string | undefined;
|
|
24
|
+
in?: string | undefined;
|
|
25
|
+
name: string;
|
|
26
|
+
required?: boolean | undefined;
|
|
27
|
+
schema?: {
|
|
28
|
+
format: string;
|
|
29
|
+
type: string;
|
|
30
|
+
} | undefined;
|
|
31
|
+
}[];
|
|
32
|
+
responses: Record<string, import("../types").Response>;
|
|
33
|
+
security: import("openapi-types").OpenAPIV3.SecurityRequirementObject[];
|
|
34
|
+
requestBody: {
|
|
35
|
+
description: string;
|
|
36
|
+
content: {
|
|
37
|
+
"application/json": {
|
|
38
|
+
schema: {
|
|
39
|
+
type: string;
|
|
40
|
+
required: string[];
|
|
41
|
+
properties: import("../types").ContentProperties;
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
"application/xml": {
|
|
45
|
+
schema: {
|
|
46
|
+
type: string;
|
|
47
|
+
required: string[];
|
|
48
|
+
properties: import("../types").ContentProperties;
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
"text/plain": {
|
|
52
|
+
schema: {
|
|
53
|
+
type: string;
|
|
54
|
+
required: string[];
|
|
55
|
+
properties: import("../types").ContentProperties;
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
"text/html": {
|
|
59
|
+
schema: {
|
|
60
|
+
type: string;
|
|
61
|
+
required: string[];
|
|
62
|
+
properties: import("../types").ContentProperties;
|
|
63
|
+
};
|
|
64
|
+
};
|
|
65
|
+
"application/x-www-form-urlencoded": {
|
|
66
|
+
schema: {
|
|
67
|
+
type: string;
|
|
68
|
+
required: string[];
|
|
69
|
+
properties: import("../types").ContentProperties;
|
|
70
|
+
};
|
|
71
|
+
};
|
|
72
|
+
"multipart/form-data": {
|
|
73
|
+
schema: {
|
|
74
|
+
type: string;
|
|
75
|
+
required: string[];
|
|
76
|
+
properties: import("../types").ContentProperties;
|
|
77
|
+
};
|
|
78
|
+
};
|
|
79
|
+
};
|
|
80
|
+
required: boolean;
|
|
81
|
+
};
|
|
82
|
+
summary: string;
|
|
83
|
+
tags: string[];
|
|
84
|
+
};
|
|
85
|
+
responses: Record<string, import("../types").Response & {
|
|
86
|
+
headers: import("../types").ExampleResponseHeaders;
|
|
87
|
+
}>;
|
|
88
|
+
}[];
|
|
89
|
+
}[];
|
|
90
|
+
info: {
|
|
91
|
+
title: string;
|
|
92
|
+
description: string;
|
|
93
|
+
termsOfService: string;
|
|
94
|
+
contact: {
|
|
95
|
+
email: string;
|
|
96
|
+
};
|
|
97
|
+
license: {
|
|
98
|
+
name: string;
|
|
99
|
+
url: string;
|
|
100
|
+
};
|
|
101
|
+
version: string;
|
|
102
|
+
};
|
|
103
|
+
externalDocs: {
|
|
104
|
+
description: string;
|
|
105
|
+
url: string;
|
|
106
|
+
};
|
|
107
|
+
servers: {
|
|
108
|
+
url: string;
|
|
109
|
+
description?: string | undefined;
|
|
110
|
+
variables?: Record<string, {
|
|
111
|
+
default?: string | number | undefined;
|
|
112
|
+
description?: string | undefined;
|
|
113
|
+
enum?: (string | number)[] | undefined;
|
|
114
|
+
}> | undefined;
|
|
115
|
+
}[];
|
|
116
|
+
components?: {
|
|
117
|
+
schemas?: {
|
|
118
|
+
[key: string]: import("openapi-types").OpenAPIV3.ReferenceObject | import("openapi-types").OpenAPIV3.SchemaObject;
|
|
119
|
+
} | undefined;
|
|
120
|
+
responses?: {
|
|
121
|
+
[key: string]: import("openapi-types").OpenAPIV3.ReferenceObject | import("openapi-types").OpenAPIV3.ResponseObject;
|
|
122
|
+
} | undefined;
|
|
123
|
+
parameters?: {
|
|
124
|
+
[key: string]: import("openapi-types").OpenAPIV3.ReferenceObject | import("openapi-types").OpenAPIV3.ParameterObject;
|
|
125
|
+
} | undefined;
|
|
126
|
+
examples?: {
|
|
127
|
+
[key: string]: import("openapi-types").OpenAPIV3.ReferenceObject | import("openapi-types").OpenAPIV3.ExampleObject;
|
|
128
|
+
} | undefined;
|
|
129
|
+
requestBodies?: {
|
|
130
|
+
[key: string]: import("openapi-types").OpenAPIV3.ReferenceObject | import("openapi-types").OpenAPIV3.RequestBodyObject;
|
|
131
|
+
} | undefined;
|
|
132
|
+
headers?: {
|
|
133
|
+
[key: string]: import("openapi-types").OpenAPIV3.ReferenceObject | import("openapi-types").OpenAPIV3.HeaderObject;
|
|
134
|
+
} | undefined;
|
|
135
|
+
securitySchemes?: {
|
|
136
|
+
[key: string]: import("openapi-types").OpenAPIV3.SecuritySchemeObject | import("openapi-types").OpenAPIV3.ReferenceObject;
|
|
137
|
+
} | undefined;
|
|
138
|
+
links?: {
|
|
139
|
+
[key: string]: import("openapi-types").OpenAPIV3.ReferenceObject | import("openapi-types").OpenAPIV3.LinkObject;
|
|
140
|
+
} | undefined;
|
|
141
|
+
callbacks?: {
|
|
142
|
+
[key: string]: import("openapi-types").OpenAPIV3.ReferenceObject | import("openapi-types").OpenAPIV3.CallbackObject;
|
|
143
|
+
} | undefined;
|
|
144
|
+
} | {
|
|
145
|
+
schemas?: Record<string, import("openapi-types").OpenAPIV3_1.SchemaObject> | undefined;
|
|
146
|
+
responses?: Record<string, import("openapi-types").OpenAPIV3_1.ReferenceObject | import("openapi-types").OpenAPIV3_1.ResponseObject> | undefined;
|
|
147
|
+
parameters?: Record<string, import("openapi-types").OpenAPIV3_1.ReferenceObject | import("openapi-types").OpenAPIV3.ParameterObject> | undefined;
|
|
148
|
+
examples?: Record<string, import("openapi-types").OpenAPIV3_1.ReferenceObject | import("openapi-types").OpenAPIV3.ExampleObject> | undefined;
|
|
149
|
+
requestBodies?: Record<string, import("openapi-types").OpenAPIV3_1.ReferenceObject | import("openapi-types").OpenAPIV3_1.RequestBodyObject> | undefined;
|
|
150
|
+
headers?: Record<string, import("openapi-types").OpenAPIV3_1.ReferenceObject | import("openapi-types").OpenAPIV3.HeaderObject> | undefined;
|
|
151
|
+
securitySchemes?: Record<string, import("openapi-types").OpenAPIV3.SecuritySchemeObject | import("openapi-types").OpenAPIV3_1.ReferenceObject> | undefined;
|
|
152
|
+
links?: Record<string, import("openapi-types").OpenAPIV3_1.ReferenceObject | import("openapi-types").OpenAPIV3_1.LinkObject> | undefined;
|
|
153
|
+
callbacks?: Record<string, import("openapi-types").OpenAPIV3_1.ReferenceObject | import("openapi-types").OpenAPIV3_1.CallbackObject> | undefined;
|
|
154
|
+
pathItems?: Record<string, import("openapi-types").OpenAPIV3_1.ReferenceObject | import("openapi-types").OpenAPIV3_1.PathItemObject<{}>> | undefined;
|
|
155
|
+
} | undefined;
|
|
156
|
+
definitions?: import("openapi-types").OpenAPIV2.DefinitionsObject | undefined;
|
|
157
|
+
openapi?: string | undefined;
|
|
158
|
+
swagger?: string | undefined;
|
|
159
|
+
};
|
|
160
|
+
overwriteParsedSpecRef: (value: Spec) => void;
|
|
161
|
+
errorRef: Ref<string | null>;
|
|
162
|
+
};
|
|
163
|
+
//# sourceMappingURL=useParser.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useParser.d.ts","sourceRoot":"","sources":["../../src/hooks/useParser.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,WAAW,EAAE,KAAK,GAAG,EAA+B,MAAM,KAAK,CAAA;AAE7E,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,UAAU,CAAA;AA4BpC;;GAEG;AACH,wBAAgB,SAAS,CAAC,EACxB,KAAK,GACN,EAAE;IACD,KAAK,CAAC,EAAE,MAAM,GAAG,GAAG,CAAC,MAAM,CAAC,GAAG,WAAW,CAAC,MAAM,CAAC,CAAA;CACnD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oCA2CwC,IAAI;;EAS5C"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type ComputedRef, type Ref } from 'vue';
|
|
2
|
+
import type { SpecConfiguration } from '../types';
|
|
3
|
+
/**
|
|
4
|
+
* Keep the raw spec content in a ref and update it when the configuration changes.
|
|
5
|
+
*/
|
|
6
|
+
export declare function useSpec({ configuration, proxy, }: {
|
|
7
|
+
configuration?: SpecConfiguration | Ref<SpecConfiguration | undefined> | ComputedRef<SpecConfiguration | undefined>;
|
|
8
|
+
proxy?: string;
|
|
9
|
+
}): {
|
|
10
|
+
rawSpecRef: Ref<string>;
|
|
11
|
+
setRawSpecRef: (value: string) => void;
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=useSpec.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useSpec.d.ts","sourceRoot":"","sources":["../../src/hooks/useSpec.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,WAAW,EAAE,KAAK,GAAG,EAAqB,MAAM,KAAK,CAAA;AAEnE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAA;AA4CjD;;GAEG;AACH,wBAAgB,OAAO,CAAC,EACtB,aAAa,EACb,KAAK,GACN,EAAE;IACD,aAAa,CAAC,EACV,iBAAiB,GACjB,GAAG,CAAC,iBAAiB,GAAG,SAAS,CAAC,GAClC,WAAW,CAAC,iBAAiB,GAAG,SAAS,CAAC,CAAA;IAC9C,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;;2BAgC+B,MAAM;EAYrC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { default as ApiClientModal, useApiClientStore, } from './components/ApiClientModal.vue';
|
|
2
2
|
export { default as ApiReference } from './components/ApiReference.vue';
|
|
3
|
+
export { default as ApiReferenceLayout } from './components/ApiReferenceLayout.vue';
|
|
3
4
|
export { default as Sidebar } from './components/Sidebar.vue';
|
|
4
5
|
export { default as RenderedReference } from './components/Content/Content.vue';
|
|
5
6
|
export { default as DarkModeToggle } from './components/DarkModeToggle.vue';
|
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,EACL,OAAO,IAAI,cAAc,EACzB,iBAAiB,GAClB,MAAM,iCAAiC,CAAA;AACxC,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,+BAA+B,CAAA;AACvE,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,0BAA0B,CAAA;AAC7D,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,kCAAkC,CAAA;AAC/E,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,iCAAiC,CAAA;AAC3E,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,8BAA8B,CAAA;AAErE,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAA;AAC1C,cAAc,SAAS,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,IAAI,cAAc,EACzB,iBAAiB,GAClB,MAAM,iCAAiC,CAAA;AACxC,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,+BAA+B,CAAA;AACvE,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,qCAAqC,CAAA;AACnF,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,0BAA0B,CAAA;AAC7D,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,kCAAkC,CAAA;AAC/E,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,iCAAiC,CAAA;AAC3E,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,8BAA8B,CAAA;AAErE,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAA;AAC1C,cAAc,SAAS,CAAA"}
|