@scalar/api-reference 1.32.1 → 1.32.5
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 +83 -0
- package/README.md +1 -1
- package/dist/browser/standalone.js +15738 -15439
- package/dist/browser/webpack-stats.json +1 -1
- package/dist/components/ApiReferenceLayout.vue.d.ts.map +1 -1
- package/dist/components/ApiReferenceLayout.vue.js +1 -1
- package/dist/components/ApiReferenceLayout.vue2.js +163 -158
- package/dist/components/Badge/Badge.vue.d.ts.map +1 -1
- package/dist/components/Badge/Badge.vue.js +1 -1
- package/dist/components/Card/CardHeader.vue.d.ts.map +1 -1
- package/dist/components/Card/CardHeader.vue.js +2 -2
- package/dist/components/Card/CardTab.vue.d.ts.map +1 -1
- package/dist/components/Card/CardTab.vue.js +3 -3
- package/dist/components/Card/CardTabHeader.vue.d.ts.map +1 -1
- package/dist/components/Card/CardTabHeader.vue.js +2 -2
- package/dist/components/Content/ClientLibraries/ClientLibraries.vue.js +1 -1
- package/dist/components/Content/ClientLibraries/ClientSelector.vue.js +1 -1
- package/dist/components/Content/Introduction/Introduction.vue.js +2 -2
- package/dist/components/Content/Lazy/Loading.vue.d.ts +1 -3
- package/dist/components/Content/Lazy/Loading.vue.d.ts.map +1 -1
- package/dist/components/Content/Lazy/Loading.vue.js +89 -89
- package/dist/components/Content/Models/Models.vue.d.ts.map +1 -1
- package/dist/components/Content/Models/Models.vue.js +2 -2
- package/dist/components/Content/Models/Models.vue2.js +59 -56
- package/dist/components/Content/Schema/RenderString.vue.d.ts +6 -0
- package/dist/components/Content/Schema/RenderString.vue.d.ts.map +1 -0
- package/dist/components/Content/Schema/RenderString.vue.js +14 -0
- package/dist/components/Content/Schema/RenderString.vue2.js +4 -0
- package/dist/components/Content/Schema/Schema.vue.d.ts +1 -1
- 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 +76 -75
- package/dist/components/Content/Schema/SchemaComposition.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaComposition.vue.js +58 -66
- package/dist/components/Content/Schema/SchemaEnumValues.vue.d.ts +19 -0
- package/dist/components/Content/Schema/SchemaEnumValues.vue.d.ts.map +1 -0
- package/dist/components/Content/Schema/SchemaEnumValues.vue.js +7 -0
- package/dist/components/Content/Schema/SchemaEnumValues.vue2.js +125 -0
- package/dist/components/Content/Schema/SchemaProperty.vue.d.ts +2 -2
- 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 +96 -170
- package/dist/components/Content/Schema/SchemaPropertyDescription.vue.d.ts +18 -0
- package/dist/components/Content/Schema/SchemaPropertyDescription.vue.d.ts.map +1 -0
- package/dist/components/Content/Schema/SchemaPropertyHeading.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaPropertyHeading.vue.js +1 -1
- package/dist/components/Content/Schema/SchemaPropertyHeading.vue2.js +155 -160
- package/dist/components/Content/Schema/helpers/get-schema-type.d.ts +6 -0
- package/dist/components/Content/Schema/helpers/get-schema-type.d.ts.map +1 -0
- package/dist/components/Content/Schema/helpers/get-schema-type.js +20 -0
- package/dist/components/Content/Schema/helpers/merge-all-of-schemas.js +1 -1
- package/dist/components/Content/Schema/helpers/optimizeValueForDisplay.d.ts.map +1 -1
- package/dist/components/Content/Schema/helpers/schema-name.d.ts.map +1 -1
- package/dist/components/Content/Schema/helpers/schema-name.js +20 -46
- package/dist/features/Operation/components/ContentTypeSelect.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/ContentTypeSelect.vue.js +6 -6
- package/dist/features/Operation/components/ParameterListItem.vue.js +3 -3
- package/dist/features/Operation/components/RequestBody.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/RequestBody.vue.js +1 -1
- package/dist/features/Operation/components/RequestBody.vue2.js +13 -10
- package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts.map +1 -1
- package/dist/features/Operation/layouts/ClassicLayout.vue.js +1 -1
- package/dist/features/Operation/layouts/ClassicLayout.vue2.js +64 -60
- 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 +13 -13
- package/dist/features/Search/SearchButton.vue.d.ts +1 -0
- package/dist/features/Search/SearchButton.vue.d.ts.map +1 -1
- package/dist/features/Search/SearchButton.vue.js +36 -34
- package/dist/features/Search/SearchModal.vue.d.ts +1 -0
- package/dist/features/Search/SearchModal.vue.d.ts.map +1 -1
- package/dist/features/Search/SearchModal.vue.js +1 -1
- package/dist/features/Search/SearchModal.vue2.js +112 -112
- package/dist/features/Search/useSearchIndex.d.ts +4 -3
- package/dist/features/Search/useSearchIndex.d.ts.map +1 -1
- package/dist/features/Search/useSearchIndex.js +119 -82
- package/dist/features/api-client-modal/ApiClientModal.vue.d.ts +2 -2
- package/dist/features/api-client-modal/ApiClientModal.vue.d.ts.map +1 -1
- package/dist/features/api-client-modal/ApiClientModal.vue.js +47 -38
- package/dist/features/api-client-modal/useApiClient.d.ts +334 -334
- package/dist/features/api-client-modal/useApiClient.d.ts.map +1 -1
- package/dist/features/base-url/BaseUrl.vue.js +1 -1
- package/dist/features/example-responses/ExampleResponse.vue.js +3 -3
- package/dist/features/example-responses/ExampleResponse.vue2.js +7 -7
- package/dist/features/example-responses/ExampleResponses.vue.d.ts +1 -1
- package/dist/features/example-responses/ExampleResponses.vue.d.ts.map +1 -1
- package/dist/features/example-responses/ExampleResponses.vue.js +2 -2
- package/dist/features/sidebar/components/SidebarElement.vue.d.ts.map +1 -1
- package/dist/features/sidebar/components/SidebarElement.vue.js +1 -1
- package/dist/features/sidebar/components/SidebarElement.vue2.js +23 -21
- package/dist/features/sidebar/components/SidebarHttpBadge.vue.d.ts.map +1 -1
- package/dist/features/sidebar/components/SidebarHttpBadge.vue.js +2 -2
- package/dist/features/sidebar/components/SidebarHttpBadge.vue2.js +5 -6
- package/dist/features/test-request-button/TestRequestButton.vue.js +2 -2
- package/dist/features/traverse-schema/helpers/traverse-tags.js +26 -26
- package/dist/features/traverse-schema/index.d.ts +1 -1
- package/dist/features/traverse-schema/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/libs/openapi.d.ts +15 -1
- package/dist/libs/openapi.d.ts.map +1 -1
- package/dist/libs/openapi.js +66 -47
- package/dist/standalone/lib/html-api.d.ts.map +1 -1
- package/dist/stores/useHttpClientStore.js +2 -2
- package/dist/style.css +1 -1
- package/dist/types.d.ts +3 -3
- package/dist/v2/blocks/scalar-request-example-block/components/RequestExample.vue.d.ts +2 -2
- package/package.json +18 -18
- package/dist/hooks/useOperation.d.ts +0 -16
- package/dist/hooks/useOperation.d.ts.map +0 -1
- package/dist/hooks/useOperation.js +0 -27
package/dist/types.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ export type ReferenceLayoutProps = {
|
|
|
11
11
|
configuration: Partial<ApiReferenceConfiguration>;
|
|
12
12
|
/**
|
|
13
13
|
*
|
|
14
|
-
* The OpenAPI 3.1 document, but all $ref
|
|
14
|
+
* The OpenAPI 3.1 document, but all $ref's are resolved already.
|
|
15
15
|
*
|
|
16
16
|
* @remark You need to add the `originalDocument`, too.
|
|
17
17
|
*
|
|
@@ -24,12 +24,12 @@ export type ReferenceLayoutProps = {
|
|
|
24
24
|
*/
|
|
25
25
|
dereferencedDocument?: OpenAPIV3_1.Document;
|
|
26
26
|
/**
|
|
27
|
-
* The raw OpenAPI document. Doesn
|
|
27
|
+
* The raw OpenAPI document. Doesn't have to be OpenAPI 3.1.
|
|
28
28
|
*/
|
|
29
29
|
originalDocument?: string;
|
|
30
30
|
isDark: boolean;
|
|
31
31
|
/**
|
|
32
|
-
* @deprecated We can
|
|
32
|
+
* @deprecated We can't use this anymore. Use `dereferencedDocument` instead.
|
|
33
33
|
*/
|
|
34
34
|
parsedSpec?: Spec;
|
|
35
35
|
/**
|
|
@@ -125,10 +125,10 @@ declare function __VLS_template(): {
|
|
|
125
125
|
};
|
|
126
126
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
127
127
|
declare const __VLS_component: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
128
|
-
"update:selectedClient": (id: "c/libcurl" | "clojure/clj_http" | "csharp/httpclient" | "csharp/restsharp" | "go/native" | "http/http1.1" | "java/asynchttp" | "java/nethttp" | "java/okhttp" | "java/unirest" | "js/axios" | "js/fetch" | "js/jquery" | "js/ofetch" | "js/xhr" | "kotlin/okhttp" | "node/axios" | "node/fetch" | "node/ofetch" | "node/undici" | "objc/nsurlsession" | "ocaml/cohttp" | "php/curl" | "php/guzzle" | "powershell/restmethod" | "powershell/webrequest" | "python/python3" | "python/requests" | "python/httpx_sync" | "python/httpx_async" | "r/httr" | "ruby/native" | "shell/curl" | "shell/httpie" | "shell/wget" | "swift/nsurlsession"
|
|
128
|
+
"update:selectedClient": (id: "c/libcurl" | "clojure/clj_http" | "csharp/httpclient" | "csharp/restsharp" | "dart/http" | "go/native" | "http/http1.1" | "java/asynchttp" | "java/nethttp" | "java/okhttp" | "java/unirest" | "js/axios" | "js/fetch" | "js/jquery" | "js/ofetch" | "js/xhr" | "kotlin/okhttp" | "node/axios" | "node/fetch" | "node/ofetch" | "node/undici" | "objc/nsurlsession" | "ocaml/cohttp" | "php/curl" | "php/guzzle" | "powershell/restmethod" | "powershell/webrequest" | "python/python3" | "python/requests" | "python/httpx_sync" | "python/httpx_async" | "r/httr" | "ruby/native" | "rust/reqwest" | "shell/curl" | "shell/httpie" | "shell/wget" | "swift/nsurlsession") => any;
|
|
129
129
|
"update:selectedExample": (name: string) => any;
|
|
130
130
|
}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{
|
|
131
|
-
"onUpdate:selectedClient"?: ((id: "c/libcurl" | "clojure/clj_http" | "csharp/httpclient" | "csharp/restsharp" | "go/native" | "http/http1.1" | "java/asynchttp" | "java/nethttp" | "java/okhttp" | "java/unirest" | "js/axios" | "js/fetch" | "js/jquery" | "js/ofetch" | "js/xhr" | "kotlin/okhttp" | "node/axios" | "node/fetch" | "node/ofetch" | "node/undici" | "objc/nsurlsession" | "ocaml/cohttp" | "php/curl" | "php/guzzle" | "powershell/restmethod" | "powershell/webrequest" | "python/python3" | "python/requests" | "python/httpx_sync" | "python/httpx_async" | "r/httr" | "ruby/native" | "shell/curl" | "shell/httpie" | "shell/wget" | "swift/nsurlsession"
|
|
131
|
+
"onUpdate:selectedClient"?: ((id: "c/libcurl" | "clojure/clj_http" | "csharp/httpclient" | "csharp/restsharp" | "dart/http" | "go/native" | "http/http1.1" | "java/asynchttp" | "java/nethttp" | "java/okhttp" | "java/unirest" | "js/axios" | "js/fetch" | "js/jquery" | "js/ofetch" | "js/xhr" | "kotlin/okhttp" | "node/axios" | "node/fetch" | "node/ofetch" | "node/undici" | "objc/nsurlsession" | "ocaml/cohttp" | "php/curl" | "php/guzzle" | "powershell/restmethod" | "powershell/webrequest" | "python/python3" | "python/requests" | "python/httpx_sync" | "python/httpx_async" | "r/httr" | "ruby/native" | "rust/reqwest" | "shell/curl" | "shell/httpie" | "shell/wget" | "swift/nsurlsession") => any) | undefined;
|
|
132
132
|
"onUpdate:selectedExample"?: ((name: string) => any) | undefined;
|
|
133
133
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
134
134
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
package/package.json
CHANGED
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"vue",
|
|
21
21
|
"vue3"
|
|
22
22
|
],
|
|
23
|
-
"version": "1.32.
|
|
23
|
+
"version": "1.32.5",
|
|
24
24
|
"engines": {
|
|
25
25
|
"node": ">=20"
|
|
26
26
|
},
|
|
@@ -54,20 +54,20 @@
|
|
|
54
54
|
"nanoid": "5.1.5",
|
|
55
55
|
"vue": "^3.5.12",
|
|
56
56
|
"zod": "3.24.1",
|
|
57
|
-
"@scalar/api-client": "2.5.
|
|
58
|
-
"@scalar/
|
|
59
|
-
"@scalar/
|
|
60
|
-
"@scalar/
|
|
61
|
-
"@scalar/icons": "0.4.
|
|
62
|
-
"@scalar/openapi-parser": "0.18.
|
|
63
|
-
"@scalar/
|
|
64
|
-
"@scalar/
|
|
65
|
-
"@scalar/
|
|
66
|
-
"@scalar/
|
|
67
|
-
"@scalar/use-hooks": "0.2.3",
|
|
68
|
-
"@scalar/themes": "0.13.6",
|
|
57
|
+
"@scalar/api-client": "2.5.15",
|
|
58
|
+
"@scalar/components": "0.14.16",
|
|
59
|
+
"@scalar/code-highlight": "0.1.5",
|
|
60
|
+
"@scalar/helpers": "0.0.6",
|
|
61
|
+
"@scalar/icons": "0.4.6",
|
|
62
|
+
"@scalar/openapi-parser": "0.18.1",
|
|
63
|
+
"@scalar/oas-utils": "0.4.11",
|
|
64
|
+
"@scalar/openapi-types": "0.3.5",
|
|
65
|
+
"@scalar/themes": "0.13.8",
|
|
66
|
+
"@scalar/snippetz": "0.4.0",
|
|
69
67
|
"@scalar/use-toasts": "0.8.0",
|
|
70
|
-
"@scalar/
|
|
68
|
+
"@scalar/use-hooks": "0.2.4",
|
|
69
|
+
"@scalar/workspace-store": "0.8.0",
|
|
70
|
+
"@scalar/types": "0.2.7"
|
|
71
71
|
},
|
|
72
72
|
"devDependencies": {
|
|
73
73
|
"@tailwindcss/vite": "^4.1.7",
|
|
@@ -83,10 +83,10 @@
|
|
|
83
83
|
"vite": "5.4.19",
|
|
84
84
|
"vite-plugin-banner": "^0.7.1",
|
|
85
85
|
"vite-plugin-css-injected-by-js": "^3.4.0",
|
|
86
|
-
"vitest": "^1.6.
|
|
87
|
-
"@scalar/build-tooling": "0.2.
|
|
88
|
-
"@scalar/galaxy": "0.5.
|
|
89
|
-
"@scalar/react-renderer": "0.2.
|
|
86
|
+
"vitest": "^1.6.1",
|
|
87
|
+
"@scalar/build-tooling": "0.2.4",
|
|
88
|
+
"@scalar/galaxy": "0.5.3",
|
|
89
|
+
"@scalar/react-renderer": "0.2.1"
|
|
90
90
|
},
|
|
91
91
|
"scripts": {
|
|
92
92
|
"build": "pnpm build:default && pnpm build:standalone && pnpm types:build && tsc-alias -p tsconfig.build.json",
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { OpenAPIV3_1, TransformedOperation } from '@scalar/types/legacy';
|
|
2
|
-
export type ParamMap = {
|
|
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
|
-
};
|
|
10
|
-
/**
|
|
11
|
-
* This hook is used to generate the parameters for the request from the parameters in the swagger file
|
|
12
|
-
*/
|
|
13
|
-
export declare function useOperation(operation: TransformedOperation): {
|
|
14
|
-
parameterMap: import("vue").ComputedRef<ParamMap>;
|
|
15
|
-
};
|
|
16
|
-
//# sourceMappingURL=useOperation.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
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,27 +0,0 @@
|
|
|
1
|
-
import { isDereferenced as u } from "@scalar/openapi-types/helpers";
|
|
2
|
-
import { computed as n } from "vue";
|
|
3
|
-
function l(s) {
|
|
4
|
-
return {
|
|
5
|
-
parameterMap: n(() => {
|
|
6
|
-
var h;
|
|
7
|
-
const o = {
|
|
8
|
-
path: [],
|
|
9
|
-
query: [],
|
|
10
|
-
header: [],
|
|
11
|
-
cookie: [],
|
|
12
|
-
body: [],
|
|
13
|
-
formData: []
|
|
14
|
-
};
|
|
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);
|
|
17
|
-
});
|
|
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;
|
|
22
|
-
})
|
|
23
|
-
};
|
|
24
|
-
}
|
|
25
|
-
export {
|
|
26
|
-
l as useOperation
|
|
27
|
-
};
|