@scalar/workspace-store 0.51.0 → 0.51.2
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 +16 -0
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +23 -13
- package/dist/entities/auth/schema.d.ts +15 -0
- package/dist/entities/auth/schema.d.ts.map +1 -1
- package/dist/helpers/merge-object.d.ts +1 -1
- package/dist/helpers/merge-object.d.ts.map +1 -1
- package/dist/navigation/get-navigation-options.d.ts +1 -1
- package/dist/navigation/get-navigation-options.d.ts.map +1 -1
- package/dist/navigation/get-navigation-options.js +1 -0
- package/dist/navigation/helpers/traverse-document.d.ts.map +1 -1
- package/dist/navigation/helpers/traverse-document.js +8 -2
- package/dist/navigation/helpers/traverse-paths.d.ts +4 -2
- package/dist/navigation/helpers/traverse-paths.d.ts.map +1 -1
- package/dist/navigation/helpers/traverse-paths.js +5 -3
- package/dist/navigation/types.d.ts +4 -0
- package/dist/navigation/types.d.ts.map +1 -1
- package/dist/request-example/builder/body/build-request-body.d.ts.map +1 -1
- package/dist/request-example/builder/body/build-request-body.js +65 -1
- package/dist/schemas/extensions/document/x-scalar-environments.d.ts +6 -6
- package/dist/schemas/extensions/document/x-scalar-original-source-url.d.ts +15 -0
- package/dist/schemas/extensions/document/x-scalar-original-source-url.d.ts.map +1 -0
- package/dist/schemas/extensions/document/x-scalar-original-source-url.js +16 -0
- package/dist/schemas/extensions/operation/x-badge.d.ts +2 -2
- package/dist/schemas/extensions/operation/x-scalar-stability.d.ts +1 -1
- package/dist/schemas/extensions/schema/x-enum-descriptions.d.ts +2 -2
- package/dist/schemas/extensions/security/x-scalar-credentials-location.d.ts +1 -1
- package/dist/schemas/extensions/security/x-use-pkce.d.ts +1 -1
- package/dist/schemas/extensions/workspace/x-scalar-active-proxy.d.ts +1 -1
- package/dist/schemas/reference-config/index.d.ts +3 -0
- package/dist/schemas/reference-config/index.d.ts.map +1 -1
- package/dist/schemas/reference-config/settings.d.ts +3 -0
- package/dist/schemas/reference-config/settings.d.ts.map +1 -1
- package/dist/schemas/type-guards.d.ts +1 -1
- package/dist/schemas/type-guards.d.ts.map +1 -1
- package/dist/schemas/type-guards.js +3 -8
- package/dist/schemas/v3.1/openapi/index.d.ts +2 -2
- package/dist/schemas/v3.1/openapi/index.d.ts.map +1 -1
- package/dist/schemas/v3.1/openapi/index.js +2 -3
- package/dist/schemas/v3.1/strict/encoding.d.ts +12 -0
- package/dist/schemas/v3.1/strict/encoding.d.ts.map +1 -1
- package/dist/schemas/v3.1/strict/encoding.js +11 -0
- package/dist/schemas/v3.1/strict/openapi-document.d.ts +107 -2
- package/dist/schemas/v3.1/strict/openapi-document.d.ts.map +1 -1
- package/dist/schemas/v3.1/strict/openapi-document.js +2 -6
- package/dist/schemas/workspace.d.ts +1 -12
- package/dist/schemas/workspace.d.ts.map +1 -1
- package/dist/schemas/workspace.js +0 -13
- package/dist/schemas.d.ts +1 -2
- package/dist/schemas.d.ts.map +1 -1
- package/dist/schemas.js +0 -2
- package/package.json +7 -6
- package/dist/schemas/asyncapi/asyncapi-document.d.ts +0 -79
- package/dist/schemas/asyncapi/asyncapi-document.d.ts.map +0 -1
- package/dist/schemas/asyncapi/asyncapi-document.js +0 -58
- package/dist/schemas/extensions/document/workspace-managed-extensions.d.ts +0 -25
- package/dist/schemas/extensions/document/workspace-managed-extensions.d.ts.map +0 -1
- package/dist/schemas/extensions/document/workspace-managed-extensions.js +0 -26
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @scalar/workspace-store
|
|
2
2
|
|
|
3
|
+
## 0.51.2
|
|
4
|
+
|
|
5
|
+
## 0.51.1
|
|
6
|
+
|
|
7
|
+
### Patch Changes
|
|
8
|
+
|
|
9
|
+
- [#9145](https://github.com/scalar/scalar/pull/9145): feat(workspace-store): expose `style`, `explode`, and `allowReserved` on the multipart Encoding Object schema and type, matching OpenAPI 3.1.1
|
|
10
|
+
- [#9155](https://github.com/scalar/scalar/pull/9155): feat(api-client): expand nested object properties of multipart form-data schemas into individual editable rows (e.g. `props.name`, `props.description`); the wire still sends one `application/json` multipart part per top-level object property — both for the initial schema-derived example and for edited form rows
|
|
11
|
+
- [#9292](https://github.com/scalar/scalar/pull/9292): refactor: move extensions to the schema package
|
|
12
|
+
- [#9301](https://github.com/scalar/scalar/pull/9301): refactor: use AsyncAPI 3.1 schemas from `@scalar/schemas`
|
|
13
|
+
- Remove local minimal AsyncAPI document schema definitions
|
|
14
|
+
- Use `asyncApiObjectSchema` from `@scalar/schemas/asyncapi/3.1` for workspace document validation
|
|
15
|
+
- Use `AsyncApiDocument` type from `@scalar/types/asyncapi/3.1`
|
|
16
|
+
|
|
17
|
+
- [#9256](https://github.com/scalar/scalar/pull/9256): Respect `operationTitleSource: 'path'` when building sidebar navigation so operation paths render instead of summaries.
|
|
18
|
+
|
|
3
19
|
## 0.51.0
|
|
4
20
|
|
|
5
21
|
### Minor Changes
|
package/dist/client.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,YAAY,EAAU,MAAM,2BAA2B,CAAA;AAErE,OAAO,EAAE,KAAK,UAAU,EAAe,KAAK,EAAE,MAAM,yBAAyB,CAAA;
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,YAAY,EAAU,MAAM,2BAA2B,CAAA;AAErE,OAAO,EAAE,KAAK,UAAU,EAAe,KAAK,EAAE,MAAM,yBAAyB,CAAA;AAQ7E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,WAAW,CAAA;AAI5C,OAAO,EAAE,KAAK,SAAS,EAAmB,MAAM,iBAAiB,CAAA;AACjE,OAAO,EAAE,KAAK,YAAY,EAAsB,MAAM,oBAAoB,CAAA;AAS1E,OA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ic/bundle/plugins/browser';
|
|
|
8
8
|
import { apply, diff, merge } from '@scalar/json-magic/diff';
|
|
9
9
|
import { createMagicProxy, getRaw } from '@scalar/json-magic/magic-proxy';
|
|
10
10
|
import { upgrade } from '@scalar/openapi-upgrader';
|
|
11
|
+
import { asyncApiObjectSchema } from '@scalar/schemas/asyncapi/3.1';
|
|
11
12
|
import { Value } from '@scalar/typebox/value';
|
|
12
13
|
import { coerce } from '@scalar/validation';
|
|
13
14
|
import { reactive } from 'vue';
|
|
@@ -445,6 +446,16 @@ export const createWorkspaceStore = (workspaceProps) => {
|
|
|
445
446
|
extraDocumentConfigurations[name] = { fetch: input.fetch };
|
|
446
447
|
}
|
|
447
448
|
});
|
|
449
|
+
const loaders = [
|
|
450
|
+
fetchUrls({
|
|
451
|
+
fetch: extraDocumentConfigurations[name]?.fetch ?? workspaceProps?.fetch,
|
|
452
|
+
}),
|
|
453
|
+
];
|
|
454
|
+
// If a file loader plugin is provided, use it to resolve local file references
|
|
455
|
+
// This is useful for non browser environments
|
|
456
|
+
if (workspaceProps?.fileLoader) {
|
|
457
|
+
loaders.push(workspaceProps.fileLoader);
|
|
458
|
+
}
|
|
448
459
|
// AsyncAPI ingestion: skip the OpenAPI-specific upgrade, bundle, coerce,
|
|
449
460
|
// validate, and navigation pipeline. The OpenAPI `coerce` step would
|
|
450
461
|
// otherwise inject an empty `openapi: ''` field and break the type
|
|
@@ -453,14 +464,23 @@ export const createWorkspaceStore = (workspaceProps) => {
|
|
|
453
464
|
// managed metadata (source url, document hash, spec version) is set so
|
|
454
465
|
// change detection on rebase can compare hashes correctly.
|
|
455
466
|
if (isAsyncApiDocument(clonedRawInputDocument)) {
|
|
456
|
-
const asyncApiDocument = {
|
|
467
|
+
const asyncApiDocument = createMagicProxy({
|
|
457
468
|
...clonedRawInputDocument,
|
|
458
469
|
...meta,
|
|
459
470
|
'x-original-aas-version': clonedRawInputDocument.asyncapi,
|
|
460
471
|
'x-scalar-original-document-hash': input.documentHash,
|
|
461
472
|
'x-scalar-original-source-url': input.documentSource,
|
|
462
|
-
};
|
|
463
|
-
|
|
473
|
+
});
|
|
474
|
+
await withMeasurementAsync('bundle', async () => await bundle(getRaw(asyncApiDocument), {
|
|
475
|
+
treeShake: false,
|
|
476
|
+
plugins: loaders,
|
|
477
|
+
urlMap: true,
|
|
478
|
+
origin: input.documentSource, // use the document origin (if provided) as the base URL for resolution
|
|
479
|
+
}));
|
|
480
|
+
// We coerce the values only when the document is not preprocessed by the server-side-store
|
|
481
|
+
const coerced = withMeasurementSync('coerceValue', () => coerce(asyncApiObjectSchema, deepClone(getRaw(asyncApiDocument))));
|
|
482
|
+
withMeasurementSync('mergeObjects', () => mergeObjects(asyncApiDocument, coerced));
|
|
483
|
+
workspace.documents[name] = createOverridesProxy(asyncApiDocument, {
|
|
464
484
|
overrides: unpackProxyObject(overrides[name]),
|
|
465
485
|
});
|
|
466
486
|
return;
|
|
@@ -477,16 +497,6 @@ export const createWorkspaceStore = (workspaceProps) => {
|
|
|
477
497
|
// This typically applies when the document is not preprocessed by the server and needs local reference resolution.
|
|
478
498
|
// We need to bundle document first before we validate, so we can also validate the external references
|
|
479
499
|
if (strictDocument[extensions.document.navigation] === undefined) {
|
|
480
|
-
const loaders = [
|
|
481
|
-
fetchUrls({
|
|
482
|
-
fetch: extraDocumentConfigurations[name]?.fetch ?? workspaceProps?.fetch,
|
|
483
|
-
}),
|
|
484
|
-
];
|
|
485
|
-
// If a file loader plugin is provided, use it to resolve local file references
|
|
486
|
-
// This is useful for non browser environments
|
|
487
|
-
if (workspaceProps?.fileLoader) {
|
|
488
|
-
loaders.push(workspaceProps.fileLoader);
|
|
489
|
-
}
|
|
490
500
|
await withMeasurementAsync('bundle', async () => await bundle(getRaw(strictDocument), {
|
|
491
501
|
treeShake: false,
|
|
492
502
|
plugins: [
|
|
@@ -1520,6 +1520,9 @@ declare const SelectedSecuritySchema: import("@scalar/typebox").TObject<{
|
|
|
1520
1520
|
}>]>, import("@scalar/typebox").TObject<{
|
|
1521
1521
|
'$ref-value': import("@scalar/typebox").TRef<"HeaderObject">;
|
|
1522
1522
|
}>]>]>>>;
|
|
1523
|
+
style: import("@scalar/typebox").TOptional<import("@scalar/typebox").TUnion<[import("@scalar/typebox").TLiteral<"form">, import("@scalar/typebox").TLiteral<"spaceDelimited">, import("@scalar/typebox").TLiteral<"pipeDelimited">, import("@scalar/typebox").TLiteral<"deepObject">]>>;
|
|
1524
|
+
explode: import("@scalar/typebox").TOptional<import("@scalar/typebox").TBoolean>;
|
|
1525
|
+
allowReserved: import("@scalar/typebox").TOptional<import("@scalar/typebox").TBoolean>;
|
|
1523
1526
|
}>;
|
|
1524
1527
|
MediaTypeObject: import("@scalar/typebox").TObject<{
|
|
1525
1528
|
schema: import("@scalar/typebox").TOptional<import("@scalar/typebox").TUnion<[import("@scalar/typebox").TRef<"SchemaObject">, import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TObject<{
|
|
@@ -3151,6 +3154,9 @@ export declare const AuthSchema: import("@scalar/typebox").TObject<{
|
|
|
3151
3154
|
}>]>, import("@scalar/typebox").TObject<{
|
|
3152
3155
|
'$ref-value': import("@scalar/typebox").TRef<"HeaderObject">;
|
|
3153
3156
|
}>]>]>>>;
|
|
3157
|
+
style: import("@scalar/typebox").TOptional<import("@scalar/typebox").TUnion<[import("@scalar/typebox").TLiteral<"form">, import("@scalar/typebox").TLiteral<"spaceDelimited">, import("@scalar/typebox").TLiteral<"pipeDelimited">, import("@scalar/typebox").TLiteral<"deepObject">]>>;
|
|
3158
|
+
explode: import("@scalar/typebox").TOptional<import("@scalar/typebox").TBoolean>;
|
|
3159
|
+
allowReserved: import("@scalar/typebox").TOptional<import("@scalar/typebox").TBoolean>;
|
|
3154
3160
|
}>;
|
|
3155
3161
|
MediaTypeObject: import("@scalar/typebox").TObject<{
|
|
3156
3162
|
schema: import("@scalar/typebox").TOptional<import("@scalar/typebox").TUnion<[import("@scalar/typebox").TRef<"SchemaObject">, import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TObject<{
|
|
@@ -4599,6 +4605,9 @@ export declare const AuthSchema: import("@scalar/typebox").TObject<{
|
|
|
4599
4605
|
}>]>, import("@scalar/typebox").TObject<{
|
|
4600
4606
|
'$ref-value': import("@scalar/typebox").TRef<"HeaderObject">;
|
|
4601
4607
|
}>]>]>>>;
|
|
4608
|
+
style: import("@scalar/typebox").TOptional<import("@scalar/typebox").TUnion<[import("@scalar/typebox").TLiteral<"form">, import("@scalar/typebox").TLiteral<"spaceDelimited">, import("@scalar/typebox").TLiteral<"pipeDelimited">, import("@scalar/typebox").TLiteral<"deepObject">]>>;
|
|
4609
|
+
explode: import("@scalar/typebox").TOptional<import("@scalar/typebox").TBoolean>;
|
|
4610
|
+
allowReserved: import("@scalar/typebox").TOptional<import("@scalar/typebox").TBoolean>;
|
|
4602
4611
|
}>;
|
|
4603
4612
|
MediaTypeObject: import("@scalar/typebox").TObject<{
|
|
4604
4613
|
schema: import("@scalar/typebox").TOptional<import("@scalar/typebox").TUnion<[import("@scalar/typebox").TRef<"SchemaObject">, import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TObject<{
|
|
@@ -6232,6 +6241,9 @@ export declare const DocumentAuthSchema: import("@scalar/typebox").TRecord<impor
|
|
|
6232
6241
|
}>]>, import("@scalar/typebox").TObject<{
|
|
6233
6242
|
'$ref-value': import("@scalar/typebox").TRef<"HeaderObject">;
|
|
6234
6243
|
}>]>]>>>;
|
|
6244
|
+
style: import("@scalar/typebox").TOptional<import("@scalar/typebox").TUnion<[import("@scalar/typebox").TLiteral<"form">, import("@scalar/typebox").TLiteral<"spaceDelimited">, import("@scalar/typebox").TLiteral<"pipeDelimited">, import("@scalar/typebox").TLiteral<"deepObject">]>>;
|
|
6245
|
+
explode: import("@scalar/typebox").TOptional<import("@scalar/typebox").TBoolean>;
|
|
6246
|
+
allowReserved: import("@scalar/typebox").TOptional<import("@scalar/typebox").TBoolean>;
|
|
6235
6247
|
}>;
|
|
6236
6248
|
MediaTypeObject: import("@scalar/typebox").TObject<{
|
|
6237
6249
|
schema: import("@scalar/typebox").TOptional<import("@scalar/typebox").TUnion<[import("@scalar/typebox").TRef<"SchemaObject">, import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TObject<{
|
|
@@ -7680,6 +7692,9 @@ export declare const DocumentAuthSchema: import("@scalar/typebox").TRecord<impor
|
|
|
7680
7692
|
}>]>, import("@scalar/typebox").TObject<{
|
|
7681
7693
|
'$ref-value': import("@scalar/typebox").TRef<"HeaderObject">;
|
|
7682
7694
|
}>]>]>>>;
|
|
7695
|
+
style: import("@scalar/typebox").TOptional<import("@scalar/typebox").TUnion<[import("@scalar/typebox").TLiteral<"form">, import("@scalar/typebox").TLiteral<"spaceDelimited">, import("@scalar/typebox").TLiteral<"pipeDelimited">, import("@scalar/typebox").TLiteral<"deepObject">]>>;
|
|
7696
|
+
explode: import("@scalar/typebox").TOptional<import("@scalar/typebox").TBoolean>;
|
|
7697
|
+
allowReserved: import("@scalar/typebox").TOptional<import("@scalar/typebox").TBoolean>;
|
|
7683
7698
|
}>;
|
|
7684
7699
|
MediaTypeObject: import("@scalar/typebox").TObject<{
|
|
7685
7700
|
schema: import("@scalar/typebox").TOptional<import("@scalar/typebox").TUnion<[import("@scalar/typebox").TRef<"SchemaObject">, import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TObject<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../src/entities/auth/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,MAAM,EAAQ,MAAM,iBAAiB,CAAA;AAoBnD,QAAA,MAAM,mBAAmB;;;;IAKxB,CAAA;AAED,MAAM,MAAM,aAAa,GAAG,MAAM,CAAC,OAAO,mBAAmB,CAAC,CAAA;AAE9D,QA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAAyC,CAAA;AACxE,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,CAAA"}
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
* const target = { age: 30 }
|
|
28
28
|
* mergeObjects(target, obj) // Safely merges without infinite recursion
|
|
29
29
|
*/
|
|
30
|
-
export declare const mergeObjects: <R>(a: Record<string, unknown>, b: Record<string, unknown>,
|
|
30
|
+
export declare const mergeObjects: <R = unknown>(a: Record<string, unknown>, b: Record<string, unknown>,
|
|
31
31
|
/**
|
|
32
32
|
* By default we overwrite array indexes, our store is built on this assumption when coercing the document
|
|
33
33
|
* Alternatively we may want to prevent this behaviour when merging with defaults and replace the whole array instead
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"merge-object.d.ts","sourceRoot":"","sources":["../../src/helpers/merge-object.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,eAAO,MAAM,YAAY,GAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"merge-object.d.ts","sourceRoot":"","sources":["../../src/helpers/merge-object.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,eAAO,MAAM,YAAY,GAAI,CAAC,GAAG,OAAO,EACtC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC1B,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;AAC1B;;;GAGG;AACH,uBAAqB,EACrB,QAAO,GAAG,CAAC,OAAO,CAAa,KAC9B,CA4CF,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ApiReferenceConfigurationRaw } from '@scalar/types/api-reference';
|
|
2
2
|
import type { TraverseSpecOptions } from '../navigation/types.js';
|
|
3
|
-
export type NavigationOptions = Partial<Pick<ApiReferenceConfigurationRaw, 'generateHeadingSlug' | 'generateTagSlug' | 'generateOperationSlug' | 'generateWebhookSlug' | 'generateModelSlug' | 'operationsSorter' | 'tagsSorter' | 'hideModels'>> | undefined;
|
|
3
|
+
export type NavigationOptions = Partial<Pick<ApiReferenceConfigurationRaw, 'generateHeadingSlug' | 'generateTagSlug' | 'generateOperationSlug' | 'generateWebhookSlug' | 'generateModelSlug' | 'operationsSorter' | 'tagsSorter' | 'hideModels' | 'operationTitleSource'>> | undefined;
|
|
4
4
|
/**
|
|
5
5
|
* Returns options for traversing an OpenAPI document, allowing customization of
|
|
6
6
|
* how IDs and slugs are generated for tags, headings, models, operations, and webhooks.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-navigation-options.d.ts","sourceRoot":"","sources":["../../src/navigation/get-navigation-options.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,6BAA6B,CAAA;AAE/E,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAA;AAG7D,MAAM,MAAM,iBAAiB,GACzB,OAAO,CACL,IAAI,CACF,4BAA4B,EAC1B,qBAAqB,GACrB,iBAAiB,GACjB,uBAAuB,GACvB,qBAAqB,GACrB,mBAAmB,GACnB,kBAAkB,GAClB,YAAY,GACZ,YAAY,
|
|
1
|
+
{"version":3,"file":"get-navigation-options.d.ts","sourceRoot":"","sources":["../../src/navigation/get-navigation-options.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,6BAA6B,CAAA;AAE/E,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAA;AAG7D,MAAM,MAAM,iBAAiB,GACzB,OAAO,CACL,IAAI,CACF,4BAA4B,EAC1B,qBAAqB,GACrB,iBAAiB,GACjB,uBAAuB,GACvB,qBAAqB,GACrB,mBAAmB,GACnB,kBAAkB,GAClB,YAAY,GACZ,YAAY,GACZ,sBAAsB,CACzB,CACF,GACD,SAAS,CAAA;AAEb;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,GAAI,cAAc,MAAM,EAAE,UAAU,iBAAiB,KAAG,mBAkHxF,CAAA"}
|
|
@@ -96,6 +96,7 @@ export const getNavigationOptions = (documentName, options) => {
|
|
|
96
96
|
hideModels: options?.hideModels ?? false,
|
|
97
97
|
operationsSorter: options?.operationsSorter,
|
|
98
98
|
tagsSorter: options?.tagsSorter,
|
|
99
|
+
operationTitleSource: options?.operationTitleSource,
|
|
99
100
|
generateId,
|
|
100
101
|
};
|
|
101
102
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"traverse-document.d.ts","sourceRoot":"","sources":["../../../src/navigation/helpers/traverse-document.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,iBAAiB,EAAwB,MAAM,qCAAqC,CAAA;AAElG,OAAO,KAAK,EAAqB,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAC7E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wCAAwC,CAAA;AAQ7E;;;;;;;;GAQG;AACH,eAAO,MAAM,gBAAgB,GAAI,cAAc,MAAM,EAAE,UAAU,eAAe,EAAE,UAAU,iBAAiB;;;;;;;
|
|
1
|
+
{"version":3,"file":"traverse-document.d.ts","sourceRoot":"","sources":["../../../src/navigation/helpers/traverse-document.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,iBAAiB,EAAwB,MAAM,qCAAqC,CAAA;AAElG,OAAO,KAAK,EAAqB,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAC7E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wCAAwC,CAAA;AAQ7E;;;;;;;;GAQG;AACH,eAAO,MAAM,gBAAgB,GAAI,cAAc,MAAM,EAAE,UAAU,eAAe,EAAE,UAAU,iBAAiB;;;;;;;CA6H5G,CAAA"}
|
|
@@ -15,7 +15,7 @@ import { traverseWebhooks } from './traverse-webhooks.js';
|
|
|
15
15
|
* - Optional schema/model documentation
|
|
16
16
|
*/
|
|
17
17
|
export const traverseDocument = (documentName, document, options) => {
|
|
18
|
-
const { hideModels, tagsSorter, operationsSorter, generateId } = getNavigationOptions(documentName, options);
|
|
18
|
+
const { hideModels, tagsSorter, operationsSorter, generateId, operationTitleSource } = getNavigationOptions(documentName, options);
|
|
19
19
|
const documentId = generateId({
|
|
20
20
|
type: 'document',
|
|
21
21
|
info: document.info,
|
|
@@ -33,7 +33,13 @@ export const traverseDocument = (documentName, document, options) => {
|
|
|
33
33
|
info: document.info,
|
|
34
34
|
});
|
|
35
35
|
/** Traverse all the document path */
|
|
36
|
-
const { untaggedOperations } = traversePaths({
|
|
36
|
+
const { untaggedOperations } = traversePaths({
|
|
37
|
+
document,
|
|
38
|
+
tagsMap,
|
|
39
|
+
generateId,
|
|
40
|
+
documentId,
|
|
41
|
+
operationTitleSource,
|
|
42
|
+
});
|
|
37
43
|
const untaggedWebhooksParentId = generateId({
|
|
38
44
|
type: 'webhook',
|
|
39
45
|
name: '',
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { TagsMap, TraverseSpecOptions } from '../../navigation/types.js';
|
|
1
|
+
import type { OperationTitleSource, TagsMap, TraverseSpecOptions } from '../../navigation/types.js';
|
|
2
2
|
import type { TraversedOperation } from '../../schemas/navigation.js';
|
|
3
3
|
import type { OpenApiDocument, OperationObject } from '../../schemas/v3.1/strict/openapi-document.js';
|
|
4
4
|
export declare const isDeprecatedOperation: (operation: OperationObject) => boolean;
|
|
@@ -19,7 +19,7 @@ export declare const isDeprecatedOperation: (operation: OperationObject) => bool
|
|
|
19
19
|
* @param getOperationId - Function to generate unique IDs for operations
|
|
20
20
|
* @returns Object containing the tagsMap and an array of untagged operations
|
|
21
21
|
*/
|
|
22
|
-
export declare const traversePaths: ({ document, tagsMap, generateId, documentId, }: {
|
|
22
|
+
export declare const traversePaths: ({ document, tagsMap, generateId, documentId, operationTitleSource, }: {
|
|
23
23
|
document: OpenApiDocument;
|
|
24
24
|
/** Map of tags and their entries */
|
|
25
25
|
tagsMap: TagsMap;
|
|
@@ -27,6 +27,8 @@ export declare const traversePaths: ({ document, tagsMap, generateId, documentId
|
|
|
27
27
|
generateId: TraverseSpecOptions["generateId"];
|
|
28
28
|
/** Document ID */
|
|
29
29
|
documentId: string;
|
|
30
|
+
/** Whether to use the operation summary or the operation path for sidebar titles */
|
|
31
|
+
operationTitleSource?: OperationTitleSource;
|
|
30
32
|
}) => {
|
|
31
33
|
untaggedOperations: TraversedOperation[];
|
|
32
34
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"traverse-paths.d.ts","sourceRoot":"","sources":["../../../src/navigation/helpers/traverse-paths.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAA;
|
|
1
|
+
{"version":3,"file":"traverse-paths.d.ts","sourceRoot":"","sources":["../../../src/navigation/helpers/traverse-paths.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,oBAAoB,EAAE,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAA;AAE5F,OAAO,KAAK,EAA+B,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AAC3F,OAAO,KAAK,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,wCAAwC,CAAA;AAI9F,eAAO,MAAM,qBAAqB,GAAI,WAAW,eAAe,YAE/D,CAAA;AAsED;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,aAAa,GAAI,sEAM3B;IACD,QAAQ,EAAE,eAAe,CAAA;IACzB,oCAAoC;IACpC,OAAO,EAAE,OAAO,CAAA;IAChB,0DAA0D;IAC1D,UAAU,EAAE,mBAAmB,CAAC,YAAY,CAAC,CAAA;IAC7C,kBAAkB;IAClB,UAAU,EAAE,MAAM,CAAA;IAClB,oFAAoF;IACpF,oBAAoB,CAAC,EAAE,oBAAoB,CAAA;CAC5C,KAAG;IAAE,kBAAkB,EAAE,kBAAkB,EAAE,CAAA;CA6D7C,CAAA"}
|
|
@@ -21,7 +21,7 @@ export const isDeprecatedOperation = (operation) => {
|
|
|
21
21
|
* @param getOperationId - Function to generate unique IDs for operations
|
|
22
22
|
* @returns A traversed operation entry with ID, title, path, method and reference
|
|
23
23
|
*/
|
|
24
|
-
const createOperationEntry = ({ ref, operation, method, path, generateId, parentId, parentTag, }) => {
|
|
24
|
+
const createOperationEntry = ({ ref, operation, method, path, generateId, parentId, parentTag, operationTitleSource, }) => {
|
|
25
25
|
const id = generateId({
|
|
26
26
|
type: 'operation',
|
|
27
27
|
operation,
|
|
@@ -30,7 +30,7 @@ const createOperationEntry = ({ ref, operation, method, path, generateId, parent
|
|
|
30
30
|
path: path,
|
|
31
31
|
parentId: parentId,
|
|
32
32
|
});
|
|
33
|
-
const title = operation.summary?.trim() ? operation.summary : path;
|
|
33
|
+
const title = operationTitleSource === 'path' ? path : operation.summary?.trim() ? operation.summary : path;
|
|
34
34
|
const isDeprecated = isDeprecatedOperation(operation);
|
|
35
35
|
const examples = traverseOperationExamples(operation).map((example) => ({
|
|
36
36
|
type: 'example',
|
|
@@ -71,7 +71,7 @@ const createOperationEntry = ({ ref, operation, method, path, generateId, parent
|
|
|
71
71
|
* @param getOperationId - Function to generate unique IDs for operations
|
|
72
72
|
* @returns Object containing the tagsMap and an array of untagged operations
|
|
73
73
|
*/
|
|
74
|
-
export const traversePaths = ({ document, tagsMap, generateId, documentId, }) => {
|
|
74
|
+
export const traversePaths = ({ document, tagsMap, generateId, documentId, operationTitleSource, }) => {
|
|
75
75
|
const untaggedOperations = [];
|
|
76
76
|
// Traverse paths
|
|
77
77
|
Object.entries(document.paths ?? {}).forEach(([path, pathItemObject]) => {
|
|
@@ -104,6 +104,7 @@ export const traversePaths = ({ document, tagsMap, generateId, documentId, }) =>
|
|
|
104
104
|
parentTag: { tag, id: tagId },
|
|
105
105
|
generateId,
|
|
106
106
|
parentId: tagId,
|
|
107
|
+
operationTitleSource,
|
|
107
108
|
}));
|
|
108
109
|
});
|
|
109
110
|
}
|
|
@@ -116,6 +117,7 @@ export const traversePaths = ({ document, tagsMap, generateId, documentId, }) =>
|
|
|
116
117
|
path,
|
|
117
118
|
generateId,
|
|
118
119
|
parentId: documentId,
|
|
120
|
+
operationTitleSource,
|
|
119
121
|
}));
|
|
120
122
|
}
|
|
121
123
|
});
|
|
@@ -14,6 +14,8 @@ type OperationSortValue = {
|
|
|
14
14
|
/** @deprecated use method instead */
|
|
15
15
|
httpVerb: string;
|
|
16
16
|
};
|
|
17
|
+
/** Whether to use the operation summary or the operation path for sidebar and search titles */
|
|
18
|
+
export type OperationTitleSource = 'summary' | 'path';
|
|
17
19
|
/** Configuration options for traversing an OpenAPI specification document.
|
|
18
20
|
*
|
|
19
21
|
* These options control how the document is processed and organized, including:
|
|
@@ -28,6 +30,8 @@ export type TraverseSpecOptions = {
|
|
|
28
30
|
operationsSorter?: 'alpha' | 'method' | ((a: OperationSortValue, b: OperationSortValue) => number);
|
|
29
31
|
/** Whether to hide model schemas from the navigation */
|
|
30
32
|
hideModels: boolean;
|
|
33
|
+
/** Whether to derive operation titles from the operation summary or the path */
|
|
34
|
+
operationTitleSource?: OperationTitleSource;
|
|
31
35
|
generateId: IdGenerator;
|
|
32
36
|
};
|
|
33
37
|
export type Heading = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/navigation/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AACvE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wCAAwC,CAAA;AAEvE,wCAAwC;AACxC,MAAM,MAAM,OAAO,GAAG,GAAG,CAAC,MAAM,EAAE;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,SAAS,CAAC;IAAC,OAAO,E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E,MAAM,CAAA;IACd,IAAI,EAAE,MAAM,CAAA;IACZ,GAAG,EAAE,MAAM,CAAA;IACX,qCAAqC;IACrC,QAAQ,EAAE,MAAM,CAAA;CACjB,CAAA;AAED,+FAA+F;AAC/F,MAAM,MAAM,oBAAoB,GAAG,SAAS,GAAG,MAAM,CAAA;AAErD;;;;;;GAMG;AACH,MAAM,MAAM,mBAAmB,GAAG;IAChC,2FAA2F;IAC3F,UAAU,CAAC,EAAE,OAAO,GAAG,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,SAAS,KAAK,MAAM,CAAC,CAAA;IAE/D,sGAAsG;IACtG,gBAAgB,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,CAAC,CAAC,CAAC,EAAE,kBAAkB,EAAE,CAAC,EAAE,kBAAkB,KAAK,MAAM,CAAC,CAAA;IAElG,wDAAwD;IACxD,UAAU,EAAE,OAAO,CAAA;IAEnB,gFAAgF;IAChF,oBAAoB,CAAC,EAAE,oBAAoB,CAAA;IAE3C,UAAU,EAAE,WAAW,CAAA;CACxB,CAAA;AAED,MAAM,MAAM,OAAO,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build-request-body.d.ts","sourceRoot":"","sources":["../../../../src/request-example/builder/body/build-request-body.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"build-request-body.d.ts","sourceRoot":"","sources":["../../../../src/request-example/builder/body/build-request-body.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,0DAA0D,CAAA;AAMjG,KAAK,QAAQ,GAAG;IACd,IAAI,EAAE,UAAU,CAAA;IAChB,KAAK,EAAE,CACH;QACE,IAAI,EAAE,MAAM,CAAA;QACZ,GAAG,EAAE,MAAM,CAAA;QACX,KAAK,EAAE,MAAM,CAAA;KACd,GACD;QACE,IAAI,EAAE,MAAM,CAAA;QACZ,GAAG,EAAE,MAAM,CAAA;QACX,KAAK,EAAE,IAAI,CAAA;QACX,WAAW,CAAC,EAAE,MAAM,CAAA;KACrB,GACD;QACE,IAAI,EAAE,MAAM,CAAA;QACZ,GAAG,EAAE,MAAM,CAAA;QACX,KAAK,EAAE,IAAI,CAAA;QACX,WAAW,CAAC,EAAE,MAAM,CAAA;KACrB,CACJ,EAAE,CAAA;CACJ,CAAA;AAED,KAAK,UAAU,GAAG;IAChB,IAAI,EAAE,YAAY,CAAA;IAClB,KAAK,EAAE;QACL,GAAG,EAAE,MAAM,CAAA;QACX,KAAK,EAAE,MAAM,CAAA;KACd,EAAE,CAAA;CACJ,CAAA;AAED,KAAK,GAAG,GAAG;IACT,IAAI,EAAE,KAAK,CAAA;IACX,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,CAAA;IAC3B,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB,CAAA;AAED,MAAM,MAAM,WAAW,GAAG,QAAQ,GAAG,UAAU,GAAG,GAAG,CAAA;AAiCrD;;GAEG;AACH,eAAO,MAAM,gBAAgB,GAC3B,aAAa,iBAAiB,GAAG,SAAS;AAC1C,qCAAqC;AACrC,oBAAuB;AACvB,sEAAsE;AACtE,kCAAkC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,KACvD,WAAW,GAAG,IA+OhB,CAAA"}
|
|
@@ -1,9 +1,39 @@
|
|
|
1
1
|
// import { replaceEnvVariables } from '@scalar/helpers/regex/replace-variables'
|
|
2
2
|
import { isObject } from '@scalar/helpers/object/is-object';
|
|
3
|
+
import { setValueAtPath } from '@scalar/helpers/object/set-value-at-path';
|
|
4
|
+
import { getResolvedRef } from '@scalar/workspace-store/helpers/get-resolved-ref';
|
|
3
5
|
import { unpackProxyObject } from '@scalar/workspace-store/helpers/unpack-proxy';
|
|
6
|
+
import { isObjectSchema } from '@scalar/workspace-store/schemas/v3.1/strict/type-guards';
|
|
4
7
|
import { getExampleFromBody } from './get-request-body-example.js';
|
|
5
8
|
import { getSelectedBodyContentType } from './get-selected-body-content-type.js';
|
|
6
9
|
const getMultipartEncodingContentType = (requestBody, bodyContentType, fieldName) => requestBody.content[bodyContentType]?.encoding?.[fieldName]?.contentType;
|
|
10
|
+
/**
|
|
11
|
+
* Build a predicate that recognizes multipart rows whose dotted name encodes a path
|
|
12
|
+
* into a nested object property of the multipart schema. Without a schema (or when
|
|
13
|
+
* the dotted prefix is not declared as a nested object), a row like `user.email`
|
|
14
|
+
* is treated as a literal name and stays flat — only schema-derived leaves emitted
|
|
15
|
+
* by `get-form-body-rows.ts` are folded back via `foldDottedRowsToObject`.
|
|
16
|
+
*/
|
|
17
|
+
const buildDottedNestedRowPredicate = (schema) => {
|
|
18
|
+
const resolved = schema ? getResolvedRef(schema) : undefined;
|
|
19
|
+
if (!resolved || !isObjectSchema(resolved) || !resolved.properties) {
|
|
20
|
+
return (_name, _value) => false;
|
|
21
|
+
}
|
|
22
|
+
const nestedTopKeys = new Set();
|
|
23
|
+
for (const [key, child] of Object.entries(resolved.properties)) {
|
|
24
|
+
const childResolved = child ? getResolvedRef(child) : undefined;
|
|
25
|
+
if (childResolved && isObjectSchema(childResolved) && childResolved.properties) {
|
|
26
|
+
nestedTopKeys.add(key);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
return (name, value) => {
|
|
30
|
+
if (value instanceof File || !name.includes('.')) {
|
|
31
|
+
return false;
|
|
32
|
+
}
|
|
33
|
+
const head = name.split('.', 1)[0];
|
|
34
|
+
return !!head && nestedTopKeys.has(head);
|
|
35
|
+
};
|
|
36
|
+
};
|
|
7
37
|
/**
|
|
8
38
|
* Create the fetch request body
|
|
9
39
|
*/
|
|
@@ -39,8 +69,42 @@ requestBodyCompositionSelection) => {
|
|
|
39
69
|
mode: 'urlencoded',
|
|
40
70
|
value: [],
|
|
41
71
|
};
|
|
72
|
+
// When a multipart form was built from a nested object schema the UI emits leaf
|
|
73
|
+
// rows with dotted names (e.g. `props.name`). Regroup them so the wire still gets
|
|
74
|
+
// one JSON multipart part per top-level object property — matching the
|
|
75
|
+
// OpenAPI 3.x multipart-as-JSON default. Url-encoded forms do not nest, so we
|
|
76
|
+
// skip this for them. The predicate is schema-driven, so a user-named row like
|
|
77
|
+
// `user.email` whose top-level prefix is not a nested object stays flat.
|
|
78
|
+
//
|
|
79
|
+
// Single pass: flat rows go into `entries` as-is; for each dotted-nested row, we
|
|
80
|
+
// lazily allocate the regrouped object for its top-level key and push it into
|
|
81
|
+
// `entries` at the position of the *first* matching row, then keep folding leaves
|
|
82
|
+
// into the same live object reference so interleaved flat rows keep their order.
|
|
83
|
+
const isDottedNestedRow = result.mode === 'formdata'
|
|
84
|
+
? buildDottedNestedRowPredicate(requestBody.content[bodyContentType]?.schema)
|
|
85
|
+
: () => false;
|
|
86
|
+
const entries = [];
|
|
87
|
+
const regroupedByTopKey = new Map();
|
|
88
|
+
for (const row of exampleValue) {
|
|
89
|
+
if (!isDottedNestedRow(row.name, row.value)) {
|
|
90
|
+
entries.push(row);
|
|
91
|
+
continue;
|
|
92
|
+
}
|
|
93
|
+
const segments = row.name.split('.');
|
|
94
|
+
const topKey = segments[0];
|
|
95
|
+
if (!topKey) {
|
|
96
|
+
continue;
|
|
97
|
+
}
|
|
98
|
+
let target = regroupedByTopKey.get(topKey);
|
|
99
|
+
if (!target) {
|
|
100
|
+
target = {};
|
|
101
|
+
regroupedByTopKey.set(topKey, target);
|
|
102
|
+
entries.push({ name: topKey, value: target });
|
|
103
|
+
}
|
|
104
|
+
setValueAtPath(target, segments.slice(1), row.value);
|
|
105
|
+
}
|
|
42
106
|
// Loop over all entries and add them to the form
|
|
43
|
-
|
|
107
|
+
entries.forEach(({ name, value }) => {
|
|
44
108
|
if (!name) {
|
|
45
109
|
return;
|
|
46
110
|
}
|
|
@@ -7,10 +7,10 @@ export declare const xScalarEnvVarSchema: import("@scalar/typebox").TObject<{
|
|
|
7
7
|
}>;
|
|
8
8
|
export declare const XScalarEnvVar: import("@scalar/validation").ObjectSchema<{
|
|
9
9
|
name: import("@scalar/validation").StringSchema;
|
|
10
|
-
value: import("@scalar/validation").UnionSchema<
|
|
10
|
+
value: import("@scalar/validation").UnionSchema<readonly [import("@scalar/validation").ObjectSchema<{
|
|
11
11
|
description: import("@scalar/validation").OptionalSchema<import("@scalar/validation").StringSchema>;
|
|
12
12
|
default: import("@scalar/validation").StringSchema;
|
|
13
|
-
}
|
|
13
|
+
}>, import("@scalar/validation").StringSchema]>;
|
|
14
14
|
}>;
|
|
15
15
|
/** A scalar environment variable */
|
|
16
16
|
export type XScalarEnvVar = {
|
|
@@ -36,10 +36,10 @@ export declare const XScalarEnvironment: import("@scalar/validation").ObjectSche
|
|
|
36
36
|
color: import("@scalar/validation").StringSchema;
|
|
37
37
|
variables: import("@scalar/validation").ArraySchema<import("@scalar/validation").ObjectSchema<{
|
|
38
38
|
name: import("@scalar/validation").StringSchema;
|
|
39
|
-
value: import("@scalar/validation").UnionSchema<
|
|
39
|
+
value: import("@scalar/validation").UnionSchema<readonly [import("@scalar/validation").ObjectSchema<{
|
|
40
40
|
description: import("@scalar/validation").OptionalSchema<import("@scalar/validation").StringSchema>;
|
|
41
41
|
default: import("@scalar/validation").StringSchema;
|
|
42
|
-
}
|
|
42
|
+
}>, import("@scalar/validation").StringSchema]>;
|
|
43
43
|
}>>;
|
|
44
44
|
}>;
|
|
45
45
|
/** An environment definition */
|
|
@@ -70,10 +70,10 @@ export declare const XScalarEnvironments: import("@scalar/validation").ObjectSch
|
|
|
70
70
|
color: import("@scalar/validation").StringSchema;
|
|
71
71
|
variables: import("@scalar/validation").ArraySchema<import("@scalar/validation").ObjectSchema<{
|
|
72
72
|
name: import("@scalar/validation").StringSchema;
|
|
73
|
-
value: import("@scalar/validation").UnionSchema<
|
|
73
|
+
value: import("@scalar/validation").UnionSchema<readonly [import("@scalar/validation").ObjectSchema<{
|
|
74
74
|
description: import("@scalar/validation").OptionalSchema<import("@scalar/validation").StringSchema>;
|
|
75
75
|
default: import("@scalar/validation").StringSchema;
|
|
76
|
-
}
|
|
76
|
+
}>, import("@scalar/validation").StringSchema]>;
|
|
77
77
|
}>>;
|
|
78
78
|
}>>>;
|
|
79
79
|
}>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Schema for the `x-scalar-original-source-url` OpenAPI extension.
|
|
3
|
+
* Tracks where the document was loaded from (file path or remote URL).
|
|
4
|
+
*/
|
|
5
|
+
export declare const XScalarOriginalSourceUrlSchema: import("@scalar/typebox").TObject<{
|
|
6
|
+
'x-scalar-original-source-url': import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
7
|
+
}>;
|
|
8
|
+
export type XScalarOriginalSourceUrl = Partial<{
|
|
9
|
+
/** Original document source URL when loaded from an external source. */
|
|
10
|
+
'x-scalar-original-source-url': string;
|
|
11
|
+
}>;
|
|
12
|
+
export declare const XScalarOriginalSourceUrl: import("@scalar/validation").ObjectSchema<{
|
|
13
|
+
'x-scalar-original-source-url': import("@scalar/validation").OptionalSchema<import("@scalar/validation").StringSchema>;
|
|
14
|
+
}>;
|
|
15
|
+
//# sourceMappingURL=x-scalar-original-source-url.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"x-scalar-original-source-url.d.ts","sourceRoot":"","sources":["../../../../src/schemas/extensions/document/x-scalar-original-source-url.ts"],"names":[],"mappings":"AAGA;;;GAGG;AACH,eAAO,MAAM,8BAA8B;;EAK1C,CAAA;AAED,MAAM,MAAM,wBAAwB,GAAG,OAAO,CAAC;IAC7C,wEAAwE;IACxE,8BAA8B,EAAE,MAAM,CAAA;CACvC,CAAC,CAAA;AAEF,eAAO,MAAM,wBAAwB;;EAUpC,CAAA"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Type } from '@scalar/typebox';
|
|
2
|
+
import { object, optional, string } from '@scalar/validation';
|
|
3
|
+
/**
|
|
4
|
+
* Schema for the `x-scalar-original-source-url` OpenAPI extension.
|
|
5
|
+
* Tracks where the document was loaded from (file path or remote URL).
|
|
6
|
+
*/
|
|
7
|
+
export const XScalarOriginalSourceUrlSchema = Type.Partial(Type.Object({
|
|
8
|
+
/** Original document source URL when loaded from an external source. */
|
|
9
|
+
'x-scalar-original-source-url': Type.String(),
|
|
10
|
+
}));
|
|
11
|
+
export const XScalarOriginalSourceUrl = object({
|
|
12
|
+
'x-scalar-original-source-url': optional(string({ typeComment: 'Original document source URL when loaded from an external source' })),
|
|
13
|
+
}, {
|
|
14
|
+
typeName: 'XScalarOriginalSourceUrl',
|
|
15
|
+
typeComment: 'Original document source URL when loaded from an external source.',
|
|
16
|
+
});
|
|
@@ -36,7 +36,7 @@ export type XBadge = {
|
|
|
36
36
|
};
|
|
37
37
|
export declare const XBadge: import("@scalar/validation").ObjectSchema<{
|
|
38
38
|
name: import("@scalar/validation").StringSchema;
|
|
39
|
-
position: import("@scalar/validation").OptionalSchema<import("@scalar/validation").UnionSchema<
|
|
39
|
+
position: import("@scalar/validation").OptionalSchema<import("@scalar/validation").UnionSchema<readonly [import("@scalar/validation").LiteralSchema<"before">, import("@scalar/validation").LiteralSchema<"after">]>>;
|
|
40
40
|
color: import("@scalar/validation").OptionalSchema<import("@scalar/validation").StringSchema>;
|
|
41
41
|
}>;
|
|
42
42
|
export declare const XBadgesSchema: import("@scalar/typebox").TObject<{
|
|
@@ -103,7 +103,7 @@ export type XBadges = {
|
|
|
103
103
|
export declare const XBadges: import("@scalar/validation").ObjectSchema<{
|
|
104
104
|
'x-badges': import("@scalar/validation").OptionalSchema<import("@scalar/validation").ArraySchema<import("@scalar/validation").ObjectSchema<{
|
|
105
105
|
name: import("@scalar/validation").StringSchema;
|
|
106
|
-
position: import("@scalar/validation").OptionalSchema<import("@scalar/validation").UnionSchema<
|
|
106
|
+
position: import("@scalar/validation").OptionalSchema<import("@scalar/validation").UnionSchema<readonly [import("@scalar/validation").LiteralSchema<"before">, import("@scalar/validation").LiteralSchema<"after">]>>;
|
|
107
107
|
color: import("@scalar/validation").OptionalSchema<import("@scalar/validation").StringSchema>;
|
|
108
108
|
}>>>;
|
|
109
109
|
}>;
|
|
@@ -27,6 +27,6 @@ export type XScalarStability = {
|
|
|
27
27
|
'x-scalar-stability'?: XScalarStabilityValues;
|
|
28
28
|
};
|
|
29
29
|
export declare const XScalarStability: import("@scalar/validation").ObjectSchema<{
|
|
30
|
-
'x-scalar-stability': import("@scalar/validation").OptionalSchema<import("@scalar/validation").UnionSchema<
|
|
30
|
+
'x-scalar-stability': import("@scalar/validation").OptionalSchema<import("@scalar/validation").UnionSchema<readonly [import("@scalar/validation").LiteralSchema<"deprecated">, import("@scalar/validation").LiteralSchema<"experimental">, import("@scalar/validation").LiteralSchema<"stable">]>>;
|
|
31
31
|
}>;
|
|
32
32
|
//# sourceMappingURL=x-scalar-stability.d.ts.map
|
|
@@ -46,7 +46,7 @@ export type XEnumDescriptions = {
|
|
|
46
46
|
'x-enum-descriptions'?: Record<string, string> | string[];
|
|
47
47
|
};
|
|
48
48
|
export declare const XEnumDescriptions: import("@scalar/validation").ObjectSchema<{
|
|
49
|
-
'x-enumDescriptions': import("@scalar/validation").OptionalSchema<import("@scalar/validation").UnionSchema<
|
|
50
|
-
'x-enum-descriptions': import("@scalar/validation").OptionalSchema<import("@scalar/validation").UnionSchema<
|
|
49
|
+
'x-enumDescriptions': import("@scalar/validation").OptionalSchema<import("@scalar/validation").UnionSchema<readonly [import("@scalar/validation").RecordSchema<import("@scalar/validation").StringSchema, import("@scalar/validation").StringSchema>, import("@scalar/validation").ArraySchema<import("@scalar/validation").StringSchema>]>>;
|
|
50
|
+
'x-enum-descriptions': import("@scalar/validation").OptionalSchema<import("@scalar/validation").UnionSchema<readonly [import("@scalar/validation").RecordSchema<import("@scalar/validation").StringSchema, import("@scalar/validation").StringSchema>, import("@scalar/validation").ArraySchema<import("@scalar/validation").StringSchema>]>>;
|
|
51
51
|
}>;
|
|
52
52
|
//# sourceMappingURL=x-enum-descriptions.d.ts.map
|