@scalar/api-reference 1.44.4 → 1.44.6
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 +31 -0
- package/dist/browser/standalone.js +1950 -1940
- package/dist/browser/webpack-stats.json +1 -1
- package/dist/components/ApiReference.vue.js +1 -1
- package/dist/components/ApiReference.vue2.js +2 -2
- package/dist/components/Content/Schema/SchemaComposition.vue.d.ts +3 -2
- package/dist/components/Content/Schema/SchemaComposition.vue.d.ts.map +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 +1 -1
- package/dist/components/Content/Schema/helpers/get-ref-name.d.ts +1 -2
- package/dist/components/Content/Schema/helpers/get-ref-name.d.ts.map +1 -1
- package/dist/components/Content/Schema/helpers/get-ref-name.js +1 -5
- package/dist/components/Content/Schema/helpers/get-schema-type.d.ts +2 -1
- package/dist/components/Content/Schema/helpers/get-schema-type.d.ts.map +1 -1
- package/dist/components/Content/Schema/helpers/get-schema-type.js +7 -1
- package/dist/components/Content/Schema/helpers/optimize-value-for-display.d.ts +5 -1
- package/dist/components/Content/Schema/helpers/optimize-value-for-display.d.ts.map +1 -1
- package/dist/components/Content/Schema/helpers/optimize-value-for-display.js +2 -0
- package/dist/components/Content/Schema/helpers/schema-name.js +1 -1
- package/dist/features/ask-agent-button/AskAgentButton.vue.d.ts.map +1 -1
- package/dist/features/ask-agent-button/AskAgentButton.vue.js +1 -1
- package/dist/style.css +99 -92
- package/package.json +11 -11
|
@@ -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-797651d6"]]);
|
|
8
8
|
export {
|
|
9
9
|
ApiReference as default
|
|
10
10
|
};
|
|
@@ -531,7 +531,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
531
531
|
_ctx.$attrs.class
|
|
532
532
|
]])
|
|
533
533
|
}, [
|
|
534
|
-
unref(agent).agentEnabled ? (openBlock(), createBlock(unref(AgentScalarDrawer), {
|
|
534
|
+
unref(agent).agentEnabled.value ? (openBlock(), createBlock(unref(AgentScalarDrawer), {
|
|
535
535
|
key: 0,
|
|
536
536
|
agentScalarConfiguration: configList.value[activeSlug.value]?.agent,
|
|
537
537
|
eventBus: unref(eventBus),
|
|
@@ -583,7 +583,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
583
583
|
hideModels: mergedConfig.value.hideModels,
|
|
584
584
|
searchHotKey: mergedConfig.value.searchHotKey
|
|
585
585
|
}, null, 8, ["document", "eventBus", "hideModels", "searchHotKey"]),
|
|
586
|
-
unref(agent).agentEnabled ? (openBlock(), createBlock(unref(_sfc_main$4), {
|
|
586
|
+
unref(agent).agentEnabled.value ? (openBlock(), createBlock(unref(_sfc_main$4), {
|
|
587
587
|
key: 0,
|
|
588
588
|
agentScalarConfiguration: configList.value[activeSlug.value]?.agent
|
|
589
589
|
}, {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { WorkspaceEventBus } from '@scalar/workspace-store/events';
|
|
2
|
-
import type { DiscriminatorObject
|
|
2
|
+
import type { DiscriminatorObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
|
|
3
|
+
import type { SchemaWithOriginalRef } from '../../../components/Content/Schema/helpers/optimize-value-for-display.js';
|
|
3
4
|
import type { SchemaOptions } from '../../../components/Content/Schema/types';
|
|
4
5
|
import { type CompositionKeyword } from './helpers/schema-composition.js';
|
|
5
6
|
type __VLS_Props = {
|
|
@@ -10,7 +11,7 @@ type __VLS_Props = {
|
|
|
10
11
|
/** Optional name for the schema */
|
|
11
12
|
name?: string;
|
|
12
13
|
/** The schema value containing the composition */
|
|
13
|
-
schema:
|
|
14
|
+
schema: SchemaWithOriginalRef;
|
|
14
15
|
/** Nesting level for proper indentation */
|
|
15
16
|
level: number;
|
|
16
17
|
/** Whether to use compact layout */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SchemaComposition.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Schema/SchemaComposition.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SchemaComposition.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Schema/SchemaComposition.vue"],"names":[],"mappings":"AA0JA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAEvE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,8DAA8D,CAAA;AAGvG,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,gEAAgE,CAAA;AAC3G,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAA;AAItE,OAAO,EAAE,KAAK,kBAAkB,EAAE,MAAM,8BAA8B,CAAA;AAGtE,KAAK,WAAW,GAAG;IACf,oDAAoD;IACpD,WAAW,EAAE,kBAAkB,CAAA;IAC/B,4DAA4D;IAC5D,aAAa,CAAC,EAAE,mBAAmB,CAAA;IACnC,mCAAmC;IACnC,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,kDAAkD;IAClD,MAAM,EAAE,qBAAqB,CAAA;IAC7B,2CAA2C;IAC3C,KAAK,EAAE,MAAM,CAAA;IACb,oCAAoC;IACpC,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,kCAAkC;IAClC,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,gCAAgC;IAChC,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;IACrB,iCAAiC;IACjC,QAAQ,EAAE,iBAAiB,GAAG,IAAI,CAAA;IAClC,yEAAyE;IACzE,OAAO,EAAE,aAAa,CAAA;CACvB,CAAC;;aATU,OAAO;iBAEH,OAAO;;AAgOzB,wBAOG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SchemaProperty.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Schema/SchemaProperty.vue"],"names":[],"mappings":"AAyaA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAEvE,OAAO,KAAK,EACV,mBAAmB,EACnB,YAAY,EACb,MAAM,8DAA8D,CAAA;AAErE,OAAO,EAAY,KAAK,SAAS,EAAE,MAAM,KAAK,CAAA;AAI9C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAA;AAetE;;;;;GAKG;AAEH,KAAK,WAAW,GAAG;IACf,EAAE,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IACvB,MAAM,EAAE,YAAY,GAAG,SAAS,CAAA;IAChC,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,aAAa,CAAC,EAAE,mBAAmB,CAAA;IACnC,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,OAAO,CAAC,EAAE,sBAAsB,GAAG,mBAAmB,CAAA;IACtD,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;IACrB,QAAQ,EAAE,iBAAiB,GAAG,IAAI,CAAA;IAClC,OAAO,EAAE,aAAa,CAAA;CACvB,CAAC;;WAZQ,MAAM;cAEH,OAAO;aACR,OAAO;oBAGA,OAAO;;
|
|
1
|
+
{"version":3,"file":"SchemaProperty.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Schema/SchemaProperty.vue"],"names":[],"mappings":"AAyaA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAEvE,OAAO,KAAK,EACV,mBAAmB,EACnB,YAAY,EACb,MAAM,8DAA8D,CAAA;AAErE,OAAO,EAAY,KAAK,SAAS,EAAE,MAAM,KAAK,CAAA;AAI9C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAA;AAetE;;;;;GAKG;AAEH,KAAK,WAAW,GAAG;IACf,EAAE,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IACvB,MAAM,EAAE,YAAY,GAAG,SAAS,CAAA;IAChC,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,aAAa,CAAC,EAAE,mBAAmB,CAAA;IACnC,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,OAAO,CAAC,EAAE,sBAAsB,GAAG,mBAAmB,CAAA;IACtD,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;IACrB,QAAQ,EAAE,iBAAiB,GAAG,IAAI,CAAA;IAClC,OAAO,EAAE,aAAa,CAAA;CACvB,CAAC;;WAZQ,MAAM;cAEH,OAAO;aACR,OAAO;oBAGA,OAAO;;AAsc5B,wBAOG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _sfc_main from "./SchemaProperty.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import _export_sfc from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const SchemaProperty = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
4
|
+
const SchemaProperty = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-8da63347"]]);
|
|
5
5
|
export {
|
|
6
6
|
SchemaProperty as default
|
|
7
7
|
};
|
|
@@ -205,7 +205,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
205
205
|
name: __props.name,
|
|
206
206
|
noncollapsible: __props.noncollapsible,
|
|
207
207
|
options: __props.options,
|
|
208
|
-
schema:
|
|
208
|
+
schema: compositionData.value
|
|
209
209
|
}, null, 8, ["breadcrumb", "compact", "composition", "discriminator", "eventBus", "hideHeading", "level", "name", "noncollapsible", "options", "schema"]);
|
|
210
210
|
}), 128)),
|
|
211
211
|
createVNode(unref(_sfc_main$3), { value: optimizedValue.value }, null, 8, ["value"])
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { ReferenceType, SchemaObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
|
|
2
1
|
/**
|
|
3
2
|
* Gets the "name" of the schema from the ref path
|
|
4
3
|
* TODO: this will change so fix it when the new refs are out
|
|
@@ -6,5 +5,5 @@ import type { ReferenceType, SchemaObject } from '@scalar/workspace-store/schema
|
|
|
6
5
|
*
|
|
7
6
|
* @example SchemaName from #/components/schemas/SchemaName
|
|
8
7
|
*/
|
|
9
|
-
export declare const getRefName: (
|
|
8
|
+
export declare const getRefName: (ref: string) => string | null | undefined;
|
|
10
9
|
//# sourceMappingURL=get-ref-name.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-ref-name.d.ts","sourceRoot":"","sources":["../../../../../src/components/Content/Schema/helpers/get-ref-name.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"get-ref-name.d.ts","sourceRoot":"","sources":["../../../../../src/components/Content/Schema/helpers/get-ref-name.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH,eAAO,MAAM,UAAU,GAAI,KAAK,MAAM,8BAWrC,CAAA"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { ReferenceType, SchemaObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
|
|
2
|
+
import type { SchemaWithOriginalRef } from '../../../../components/Content/Schema/helpers/optimize-value-for-display.js';
|
|
2
3
|
/**
|
|
3
4
|
* Computes the human-readable type for a schema.
|
|
4
5
|
*
|
|
@@ -11,5 +12,5 @@ import type { ReferenceType, SchemaObject } from '@scalar/workspace-store/schema
|
|
|
11
12
|
* 6. $ref names
|
|
12
13
|
* 7. raw type
|
|
13
14
|
*/
|
|
14
|
-
export declare const getSchemaType: (valueOrRef:
|
|
15
|
+
export declare const getSchemaType: (valueOrRef: SchemaWithOriginalRef | ReferenceType<SchemaObject>) => string;
|
|
15
16
|
//# sourceMappingURL=get-schema-type.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-schema-type.d.ts","sourceRoot":"","sources":["../../../../../src/components/Content/Schema/helpers/get-schema-type.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,8DAA8D,CAAA;
|
|
1
|
+
{"version":3,"file":"get-schema-type.d.ts","sourceRoot":"","sources":["../../../../../src/components/Content/Schema/helpers/get-schema-type.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,8DAA8D,CAAA;AAI/G,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,gEAAgE,CAAA;AAiC3G;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,aAAa,GAAI,YAAY,qBAAqB,GAAG,aAAa,CAAC,YAAY,CAAC,KAAG,MAkE/F,CAAA"}
|
|
@@ -47,8 +47,14 @@ const getSchemaType = (valueOrRef) => {
|
|
|
47
47
|
if ("type" in value && value.type && value.contentEncoding) {
|
|
48
48
|
return `${value.type} • ${value.contentEncoding}`;
|
|
49
49
|
}
|
|
50
|
+
if ("originalRef" in valueOrRef && valueOrRef.originalRef) {
|
|
51
|
+
const refName = getRefName(valueOrRef.originalRef);
|
|
52
|
+
if (refName) {
|
|
53
|
+
return refName;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
50
56
|
if ("$ref" in valueOrRef) {
|
|
51
|
-
const refName = getRefName(valueOrRef);
|
|
57
|
+
const refName = getRefName(valueOrRef.$ref);
|
|
52
58
|
if (refName) {
|
|
53
59
|
return refName;
|
|
54
60
|
}
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
import type { SchemaObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
|
|
2
|
+
/** We need to keep the original ref after we resolve for display purposes */
|
|
3
|
+
export type SchemaWithOriginalRef = SchemaObject & {
|
|
4
|
+
originalRef?: string;
|
|
5
|
+
};
|
|
2
6
|
/**
|
|
3
7
|
* Optimize the value by removing nulls from compositions and merging root properties.
|
|
4
8
|
*
|
|
5
9
|
* TODO: figure out what this does
|
|
6
10
|
*/
|
|
7
|
-
export declare function optimizeValueForDisplay(value: SchemaObject | undefined):
|
|
11
|
+
export declare function optimizeValueForDisplay(value: SchemaObject | undefined): SchemaWithOriginalRef | undefined;
|
|
8
12
|
//# sourceMappingURL=optimize-value-for-display.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"optimize-value-for-display.d.ts","sourceRoot":"","sources":["../../../../../src/components/Content/Schema/helpers/optimize-value-for-display.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8DAA8D,CAAA;AAIhG;;;;GAIG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,YAAY,GAAG,SAAS,GAAG,
|
|
1
|
+
{"version":3,"file":"optimize-value-for-display.d.ts","sourceRoot":"","sources":["../../../../../src/components/Content/Schema/helpers/optimize-value-for-display.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8DAA8D,CAAA;AAIhG,6EAA6E;AAC7E,MAAM,MAAM,qBAAqB,GAAG,YAAY,GAAG;IAAE,WAAW,CAAC,EAAE,MAAM,CAAA;CAAE,CAAA;AAE3E;;;;GAIG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,YAAY,GAAG,SAAS,GAAG,qBAAqB,GAAG,SAAS,CA0F1G"}
|
|
@@ -19,6 +19,8 @@ function optimizeValueForDisplay(value) {
|
|
|
19
19
|
const schema = getResolvedRef(_schema);
|
|
20
20
|
if ("type" in schema && schema.type === "null") {
|
|
21
21
|
acc.hasNullSchema = true;
|
|
22
|
+
} else if ("$ref" in _schema && _schema.$ref) {
|
|
23
|
+
acc.filteredSchemas.push({ ...schema, originalRef: _schema.$ref });
|
|
22
24
|
} else {
|
|
23
25
|
acc.filteredSchemas.push(schema);
|
|
24
26
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AskAgentButton.vue.d.ts","sourceRoot":"","sources":["../../../src/features/ask-agent-button/AskAgentButton.vue"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"AskAgentButton.vue.d.ts","sourceRoot":"","sources":["../../../src/features/ask-agent-button/AskAgentButton.vue"],"names":[],"mappings":";AAiPA,wBAKG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _sfc_main from "./AskAgentButton.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import _export_sfc from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const AskAgentButton = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
4
|
+
const AskAgentButton = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-b5a61e43"]]);
|
|
5
5
|
export {
|
|
6
6
|
AskAgentButton as default
|
|
7
7
|
};
|