@scalar/schemas 0.10.0 → 0.12.0

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 CHANGED
@@ -1,5 +1,25 @@
1
1
  # @scalar/schemas
2
2
 
3
+ ## 0.12.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#10310](https://github.com/scalar/scalar/pull/10310): Connect SDK code samples to named request body examples using optional example and contentType fields. Keep the example switcher available for static samples and use the selected request example in API client snippets. Display unavailable linked samples as a localized status message in all supported languages.
8
+
9
+ ### Patch Changes
10
+
11
+ - [#10315](https://github.com/scalar/scalar/pull/10315): Stop following `$ref-value` chains at the first reference that loops back, so a document whose references point at each other (or at themselves) no longer overflows the stack while it loads.
12
+
13
+ ## 0.11.0
14
+
15
+ ### Minor Changes
16
+
17
+ - [#10283](https://github.com/scalar/scalar/pull/10283): Add `expandAllParameters`, defaulting to `true`. Set it to `false` to start operation parameters collapsed and expand each parameter on click.
18
+
19
+ ### Patch Changes
20
+
21
+ - [#10212](https://github.com/scalar/scalar/pull/10212): Improve type safety for schema display metadata, schema property merging, deprecated configuration migration, and cyclic test fixtures. Load Vite declarations for raw playground imports.
22
+
3
23
  ## 0.10.0
4
24
 
5
25
  ### Minor Changes
@@ -169,6 +169,7 @@ export declare const apiReferenceConfigurationSchema: import("@scalar/validation
169
169
  defaultOpenFirstTag: import("@scalar/validation").BooleanSchema;
170
170
  defaultOpenAllTags: import("@scalar/validation").BooleanSchema;
171
171
  expandAllModelSections: import("@scalar/validation").BooleanSchema;
172
+ expandAllParameters: import("@scalar/validation").BooleanSchema;
172
173
  expandAllResponses: import("@scalar/validation").BooleanSchema;
173
174
  expandAllSchemaProperties: import("@scalar/validation").BooleanSchema;
174
175
  tagsSorter: import("@scalar/validation").OptionalSchema<import("@scalar/validation").UnionSchema<readonly [LiteralSchema<"alpha">, import("@scalar/validation").FunctionSchema<(a: any, b: any) => number>]>>;
@@ -177,7 +178,7 @@ export declare const apiReferenceConfigurationSchema: import("@scalar/validation
177
178
  schemaKeyboardNav: import("@scalar/validation").BooleanSchema;
178
179
  orderRequiredPropertiesFirst: import("@scalar/validation").BooleanSchema;
179
180
  }>]>;
180
- export declare const apiReferenceConfigurationWithSourceSchema: (rawInput: unknown) => {
181
+ export declare const apiReferenceConfigurationWithSourceSchema: (rawInput: unknown) => Omit<{
181
182
  hideClientButton: boolean;
182
183
  showSidebar: boolean;
183
184
  showDeveloperTools: "localhost" | "always" | "never";
@@ -232,6 +233,7 @@ export declare const apiReferenceConfigurationWithSourceSchema: (rawInput: unkno
232
233
  defaultOpenFirstTag: boolean;
233
234
  defaultOpenAllTags: boolean;
234
235
  expandAllModelSections: boolean;
236
+ expandAllParameters: boolean;
235
237
  expandAllResponses: boolean;
236
238
  expandAllSchemaProperties: boolean;
237
239
  orderSchemaPropertiesBy: "alpha" | "preserve";
@@ -356,5 +358,185 @@ export declare const apiReferenceConfigurationWithSourceSchema: (rawInput: unkno
356
358
  redirect?: ((input: string) => string | null | undefined) | undefined;
357
359
  tagsSorter?: "alpha" | ((a: any, b: any) => number) | undefined;
358
360
  operationsSorter?: "alpha" | "method" | ((a: any, b: any) => number) | undefined;
359
- };
361
+ }, "showToolbar"> & Partial<Pick<{
362
+ hideClientButton: boolean;
363
+ showSidebar: boolean;
364
+ showDeveloperTools: "localhost" | "always" | "never";
365
+ showToolbar: "localhost" | "always" | "never";
366
+ operationTitleSource: "summary" | "path";
367
+ theme: "default" | "alternate" | "moon" | "purple" | "solarized" | "bluePlanet" | "deepSpace" | "saturn" | "kepler" | "elysiajs" | "fastify" | "mars" | "laserwave" | "none";
368
+ persistAuth: boolean;
369
+ telemetry: boolean;
370
+ externalUrls: {
371
+ dashboardUrl: string;
372
+ registryUrl: string;
373
+ proxyUrl: string;
374
+ apiBaseUrl: string;
375
+ };
376
+ } & {
377
+ proxyUrl?: string | undefined;
378
+ title?: string | undefined;
379
+ slug?: string | undefined;
380
+ authentication?: any;
381
+ baseServerURL?: string | undefined;
382
+ oauth2RedirectUri?: string | undefined;
383
+ searchHotKey?: "a" | "b" | "c" | "d" | "e" | "f" | "g" | "h" | "i" | "j" | "k" | "l" | "m" | "n" | "o" | "p" | "q" | "r" | "s" | "t" | "u" | "v" | "w" | "x" | "y" | "z" | undefined;
384
+ servers?: any[] | undefined;
385
+ _integration?: "elysiajs" | "fastify" | "adonisjs" | "astro" | "docusaurus" | "dotnet" | "express" | "fastapi" | "go" | "hono" | "html" | "laravel" | "litestar" | "nestjs" | "nextjs" | "nitro" | "nuxt" | "platformatic" | "react" | "rust" | "svelte" | "vue" | null | undefined;
386
+ onRequestSent?: ((input: string) => void) | undefined;
387
+ } & {
388
+ default: boolean;
389
+ } & {
390
+ title?: string | undefined;
391
+ slug?: string | undefined;
392
+ url?: string | undefined;
393
+ content?: string | Record<string, any> | (() => string | any) | null | undefined;
394
+ spec?: {
395
+ url?: string | undefined;
396
+ content?: string | Record<string, any> | (() => string | any) | null | undefined;
397
+ } | undefined;
398
+ agent?: {
399
+ key?: string | undefined;
400
+ disabled?: boolean | undefined;
401
+ hideAddApi?: boolean | undefined;
402
+ } | undefined;
403
+ } & {
404
+ layout: "modern" | "classic";
405
+ isEditable: boolean;
406
+ hideModels: boolean;
407
+ documentDownloadType: "none" | "both" | "yaml" | "json" | "direct";
408
+ hideTestRequestButton: boolean;
409
+ hideSearch: boolean;
410
+ showOperationId: boolean;
411
+ hideDarkModeToggle: boolean;
412
+ withDefaultFonts: boolean;
413
+ defaultOpenFirstTag: boolean;
414
+ defaultOpenAllTags: boolean;
415
+ expandAllModelSections: boolean;
416
+ expandAllParameters: boolean;
417
+ expandAllResponses: boolean;
418
+ expandAllSchemaProperties: boolean;
419
+ orderSchemaPropertiesBy: "alpha" | "preserve";
420
+ schemaKeyboardNav: boolean;
421
+ orderRequiredPropertiesFirst: boolean;
422
+ } & {
423
+ proxy?: string | undefined;
424
+ fetch?: typeof fetch | undefined;
425
+ customFetch?: typeof fetch | undefined;
426
+ plugins?: (() => {
427
+ name: string;
428
+ extensions: import("@scalar/validation").Static<import("@scalar/validation").ObjectSchema<{
429
+ name: import("@scalar/validation").StringSchema;
430
+ component: import("@scalar/validation").UnknownSchema;
431
+ renderer: import("@scalar/validation").OptionalSchema<import("@scalar/validation").UnknownSchema>;
432
+ }>>[];
433
+ views: import("@scalar/validation").Static<import("@scalar/validation").ObjectSchema<{
434
+ 'content.start': import("@scalar/validation").OptionalSchema<import("@scalar/validation").ArraySchema<import("@scalar/validation").ObjectSchema<{
435
+ component: import("@scalar/validation").UnknownSchema;
436
+ renderer: import("@scalar/validation").OptionalSchema<import("@scalar/validation").UnknownSchema>;
437
+ props: import("@scalar/validation").OptionalSchema<import("@scalar/validation").RecordSchema<import("@scalar/validation").StringSchema, import("@scalar/validation").AnySchema>>;
438
+ sidebar: import("@scalar/validation").OptionalSchema<import("@scalar/validation").ObjectSchema<{
439
+ show: import("@scalar/validation").BooleanSchema;
440
+ label: import("@scalar/validation").StringSchema;
441
+ }>>;
442
+ }>>>;
443
+ 'content.end': import("@scalar/validation").OptionalSchema<import("@scalar/validation").ArraySchema<import("@scalar/validation").ObjectSchema<{
444
+ component: import("@scalar/validation").UnknownSchema;
445
+ renderer: import("@scalar/validation").OptionalSchema<import("@scalar/validation").UnknownSchema>;
446
+ props: import("@scalar/validation").OptionalSchema<import("@scalar/validation").RecordSchema<import("@scalar/validation").StringSchema, import("@scalar/validation").AnySchema>>;
447
+ sidebar: import("@scalar/validation").OptionalSchema<import("@scalar/validation").ObjectSchema<{
448
+ show: import("@scalar/validation").BooleanSchema;
449
+ label: import("@scalar/validation").StringSchema;
450
+ }>>;
451
+ }>>>;
452
+ }>>;
453
+ hooks: import("@scalar/validation").Static<import("@scalar/validation").ObjectSchema<{
454
+ onInit: import("@scalar/validation").OptionalSchema<import("@scalar/validation").FunctionSchema<({ config, auth }: {
455
+ config: any;
456
+ auth: any;
457
+ }) => void>>;
458
+ onConfigChange: import("@scalar/validation").OptionalSchema<import("@scalar/validation").FunctionSchema<({ config, auth }: {
459
+ config: any;
460
+ auth: any;
461
+ }) => void>>;
462
+ onDestroy: import("@scalar/validation").OptionalSchema<import("@scalar/validation").FunctionSchema<() => void>>;
463
+ }>>;
464
+ apiClientPlugins: any[];
465
+ })[] | undefined;
466
+ pluginUrls?: string[] | undefined;
467
+ modelsSectionLabel?: string | undefined;
468
+ localization?: {
469
+ locale?: string | undefined;
470
+ direction?: "auto" | "ltr" | "rtl" | undefined;
471
+ translations?: Record<string, any> | undefined;
472
+ } | undefined;
473
+ hideDownloadButton?: boolean | undefined;
474
+ darkMode?: boolean | undefined;
475
+ forceDarkModeState?: "dark" | "light" | undefined;
476
+ metaData?: any;
477
+ favicon?: string | undefined;
478
+ hiddenClients?: true | Record<string, boolean | ("laravel" | "fetch" | "http" | "libcurl" | "httr2" | "native" | "reqwest" | "clj_http" | "httpclient" | "restsharp" | "http1.1" | "asynchttp" | "nethttp" | "okhttp" | "unirest" | "axios" | "jquery" | "ofetch" | "xhr" | "undici" | "nsurlsession" | "cohttp" | "curl" | "guzzle" | "restmethod" | "webrequest" | "python3" | "requests" | "aiohttp" | "httpx_sync" | "httpx_async" | "httpie" | "wget")[]> | ("c" | "r" | "go" | "laravel" | "rust" | "fetch" | "clojure" | "csharp" | "dart" | "fsharp" | "http" | "java" | "js" | "julia" | "kotlin" | "node" | "objc" | "ocaml" | "php" | "powershell" | "python" | "ruby" | "shell" | "swift" | "libcurl" | "httr2" | "native" | "reqwest" | "clj_http" | "httpclient" | "restsharp" | "http1.1" | "asynchttp" | "nethttp" | "okhttp" | "unirest" | "axios" | "jquery" | "ofetch" | "xhr" | "undici" | "nsurlsession" | "cohttp" | "curl" | "guzzle" | "restmethod" | "webrequest" | "python3" | "requests" | "aiohttp" | "httpx_sync" | "httpx_async" | "httpie" | "wget" | "c/laravel" | "c/libcurl" | "c/clj_http" | "c/httpclient" | "c/restsharp" | "c/http" | "c/native" | "c/http1.1" | "c/asynchttp" | "c/nethttp" | "c/okhttp" | "c/unirest" | "c/axios" | "c/fetch" | "c/jquery" | "c/ofetch" | "c/xhr" | "c/undici" | "c/nsurlsession" | "c/cohttp" | "c/curl" | "c/guzzle" | "c/restmethod" | "c/webrequest" | "c/python3" | "c/requests" | "c/aiohttp" | "c/httpx_sync" | "c/httpx_async" | "c/httr2" | "c/reqwest" | "c/httpie" | "c/wget" | "r/laravel" | "r/libcurl" | "r/clj_http" | "r/httpclient" | "r/restsharp" | "r/http" | "r/native" | "r/http1.1" | "r/asynchttp" | "r/nethttp" | "r/okhttp" | "r/unirest" | "r/axios" | "r/fetch" | "r/jquery" | "r/ofetch" | "r/xhr" | "r/undici" | "r/nsurlsession" | "r/cohttp" | "r/curl" | "r/guzzle" | "r/restmethod" | "r/webrequest" | "r/python3" | "r/requests" | "r/aiohttp" | "r/httpx_sync" | "r/httpx_async" | "r/httr2" | "r/reqwest" | "r/httpie" | "r/wget" | "go/laravel" | "go/libcurl" | "go/clj_http" | "go/httpclient" | "go/restsharp" | "go/http" | "go/native" | "go/http1.1" | "go/asynchttp" | "go/nethttp" | "go/okhttp" | "go/unirest" | "go/axios" | "go/fetch" | "go/jquery" | "go/ofetch" | "go/xhr" | "go/undici" | "go/nsurlsession" | "go/cohttp" | "go/curl" | "go/guzzle" | "go/restmethod" | "go/webrequest" | "go/python3" | "go/requests" | "go/aiohttp" | "go/httpx_sync" | "go/httpx_async" | "go/httr2" | "go/reqwest" | "go/httpie" | "go/wget" | "rust/laravel" | "rust/libcurl" | "rust/clj_http" | "rust/httpclient" | "rust/restsharp" | "rust/http" | "rust/native" | "rust/http1.1" | "rust/asynchttp" | "rust/nethttp" | "rust/okhttp" | "rust/unirest" | "rust/axios" | "rust/fetch" | "rust/jquery" | "rust/ofetch" | "rust/xhr" | "rust/undici" | "rust/nsurlsession" | "rust/cohttp" | "rust/curl" | "rust/guzzle" | "rust/restmethod" | "rust/webrequest" | "rust/python3" | "rust/requests" | "rust/aiohttp" | "rust/httpx_sync" | "rust/httpx_async" | "rust/httr2" | "rust/reqwest" | "rust/httpie" | "rust/wget" | "http/laravel" | "http/libcurl" | "http/clj_http" | "http/httpclient" | "http/restsharp" | "http/http" | "http/native" | "http/http1.1" | "http/asynchttp" | "http/nethttp" | "http/okhttp" | "http/unirest" | "http/axios" | "http/fetch" | "http/jquery" | "http/ofetch" | "http/xhr" | "http/undici" | "http/nsurlsession" | "http/cohttp" | "http/curl" | "http/guzzle" | "http/restmethod" | "http/webrequest" | "http/python3" | "http/requests" | "http/aiohttp" | "http/httpx_sync" | "http/httpx_async" | "http/httr2" | "http/reqwest" | "http/httpie" | "http/wget" | "clojure/laravel" | "clojure/libcurl" | "clojure/clj_http" | "clojure/httpclient" | "clojure/restsharp" | "clojure/http" | "clojure/native" | "clojure/http1.1" | "clojure/asynchttp" | "clojure/nethttp" | "clojure/okhttp" | "clojure/unirest" | "clojure/axios" | "clojure/fetch" | "clojure/jquery" | "clojure/ofetch" | "clojure/xhr" | "clojure/undici" | "clojure/nsurlsession" | "clojure/cohttp" | "clojure/curl" | "clojure/guzzle" | "clojure/restmethod" | "clojure/webrequest" | "clojure/python3" | "clojure/requests" | "clojure/aiohttp" | "clojure/httpx_sync" | "clojure/httpx_async" | "clojure/httr2" | "clojure/reqwest" | "clojure/httpie" | "clojure/wget" | "csharp/laravel" | "csharp/libcurl" | "csharp/clj_http" | "csharp/httpclient" | "csharp/restsharp" | "csharp/http" | "csharp/native" | "csharp/http1.1" | "csharp/asynchttp" | "csharp/nethttp" | "csharp/okhttp" | "csharp/unirest" | "csharp/axios" | "csharp/fetch" | "csharp/jquery" | "csharp/ofetch" | "csharp/xhr" | "csharp/undici" | "csharp/nsurlsession" | "csharp/cohttp" | "csharp/curl" | "csharp/guzzle" | "csharp/restmethod" | "csharp/webrequest" | "csharp/python3" | "csharp/requests" | "csharp/aiohttp" | "csharp/httpx_sync" | "csharp/httpx_async" | "csharp/httr2" | "csharp/reqwest" | "csharp/httpie" | "csharp/wget" | "dart/laravel" | "dart/libcurl" | "dart/clj_http" | "dart/httpclient" | "dart/restsharp" | "dart/http" | "dart/native" | "dart/http1.1" | "dart/asynchttp" | "dart/nethttp" | "dart/okhttp" | "dart/unirest" | "dart/axios" | "dart/fetch" | "dart/jquery" | "dart/ofetch" | "dart/xhr" | "dart/undici" | "dart/nsurlsession" | "dart/cohttp" | "dart/curl" | "dart/guzzle" | "dart/restmethod" | "dart/webrequest" | "dart/python3" | "dart/requests" | "dart/aiohttp" | "dart/httpx_sync" | "dart/httpx_async" | "dart/httr2" | "dart/reqwest" | "dart/httpie" | "dart/wget" | "fsharp/laravel" | "fsharp/libcurl" | "fsharp/clj_http" | "fsharp/httpclient" | "fsharp/restsharp" | "fsharp/http" | "fsharp/native" | "fsharp/http1.1" | "fsharp/asynchttp" | "fsharp/nethttp" | "fsharp/okhttp" | "fsharp/unirest" | "fsharp/axios" | "fsharp/fetch" | "fsharp/jquery" | "fsharp/ofetch" | "fsharp/xhr" | "fsharp/undici" | "fsharp/nsurlsession" | "fsharp/cohttp" | "fsharp/curl" | "fsharp/guzzle" | "fsharp/restmethod" | "fsharp/webrequest" | "fsharp/python3" | "fsharp/requests" | "fsharp/aiohttp" | "fsharp/httpx_sync" | "fsharp/httpx_async" | "fsharp/httr2" | "fsharp/reqwest" | "fsharp/httpie" | "fsharp/wget" | "java/laravel" | "java/libcurl" | "java/clj_http" | "java/httpclient" | "java/restsharp" | "java/http" | "java/native" | "java/http1.1" | "java/asynchttp" | "java/nethttp" | "java/okhttp" | "java/unirest" | "java/axios" | "java/fetch" | "java/jquery" | "java/ofetch" | "java/xhr" | "java/undici" | "java/nsurlsession" | "java/cohttp" | "java/curl" | "java/guzzle" | "java/restmethod" | "java/webrequest" | "java/python3" | "java/requests" | "java/aiohttp" | "java/httpx_sync" | "java/httpx_async" | "java/httr2" | "java/reqwest" | "java/httpie" | "java/wget" | "js/laravel" | "js/libcurl" | "js/clj_http" | "js/httpclient" | "js/restsharp" | "js/http" | "js/native" | "js/http1.1" | "js/asynchttp" | "js/nethttp" | "js/okhttp" | "js/unirest" | "js/axios" | "js/fetch" | "js/jquery" | "js/ofetch" | "js/xhr" | "js/undici" | "js/nsurlsession" | "js/cohttp" | "js/curl" | "js/guzzle" | "js/restmethod" | "js/webrequest" | "js/python3" | "js/requests" | "js/aiohttp" | "js/httpx_sync" | "js/httpx_async" | "js/httr2" | "js/reqwest" | "js/httpie" | "js/wget" | "julia/laravel" | "julia/libcurl" | "julia/clj_http" | "julia/httpclient" | "julia/restsharp" | "julia/http" | "julia/native" | "julia/http1.1" | "julia/asynchttp" | "julia/nethttp" | "julia/okhttp" | "julia/unirest" | "julia/axios" | "julia/fetch" | "julia/jquery" | "julia/ofetch" | "julia/xhr" | "julia/undici" | "julia/nsurlsession" | "julia/cohttp" | "julia/curl" | "julia/guzzle" | "julia/restmethod" | "julia/webrequest" | "julia/python3" | "julia/requests" | "julia/aiohttp" | "julia/httpx_sync" | "julia/httpx_async" | "julia/httr2" | "julia/reqwest" | "julia/httpie" | "julia/wget" | "kotlin/laravel" | "kotlin/libcurl" | "kotlin/clj_http" | "kotlin/httpclient" | "kotlin/restsharp" | "kotlin/http" | "kotlin/native" | "kotlin/http1.1" | "kotlin/asynchttp" | "kotlin/nethttp" | "kotlin/okhttp" | "kotlin/unirest" | "kotlin/axios" | "kotlin/fetch" | "kotlin/jquery" | "kotlin/ofetch" | "kotlin/xhr" | "kotlin/undici" | "kotlin/nsurlsession" | "kotlin/cohttp" | "kotlin/curl" | "kotlin/guzzle" | "kotlin/restmethod" | "kotlin/webrequest" | "kotlin/python3" | "kotlin/requests" | "kotlin/aiohttp" | "kotlin/httpx_sync" | "kotlin/httpx_async" | "kotlin/httr2" | "kotlin/reqwest" | "kotlin/httpie" | "kotlin/wget" | "node/laravel" | "node/libcurl" | "node/clj_http" | "node/httpclient" | "node/restsharp" | "node/http" | "node/native" | "node/http1.1" | "node/asynchttp" | "node/nethttp" | "node/okhttp" | "node/unirest" | "node/axios" | "node/fetch" | "node/jquery" | "node/ofetch" | "node/xhr" | "node/undici" | "node/nsurlsession" | "node/cohttp" | "node/curl" | "node/guzzle" | "node/restmethod" | "node/webrequest" | "node/python3" | "node/requests" | "node/aiohttp" | "node/httpx_sync" | "node/httpx_async" | "node/httr2" | "node/reqwest" | "node/httpie" | "node/wget" | "objc/laravel" | "objc/libcurl" | "objc/clj_http" | "objc/httpclient" | "objc/restsharp" | "objc/http" | "objc/native" | "objc/http1.1" | "objc/asynchttp" | "objc/nethttp" | "objc/okhttp" | "objc/unirest" | "objc/axios" | "objc/fetch" | "objc/jquery" | "objc/ofetch" | "objc/xhr" | "objc/undici" | "objc/nsurlsession" | "objc/cohttp" | "objc/curl" | "objc/guzzle" | "objc/restmethod" | "objc/webrequest" | "objc/python3" | "objc/requests" | "objc/aiohttp" | "objc/httpx_sync" | "objc/httpx_async" | "objc/httr2" | "objc/reqwest" | "objc/httpie" | "objc/wget" | "ocaml/laravel" | "ocaml/libcurl" | "ocaml/clj_http" | "ocaml/httpclient" | "ocaml/restsharp" | "ocaml/http" | "ocaml/native" | "ocaml/http1.1" | "ocaml/asynchttp" | "ocaml/nethttp" | "ocaml/okhttp" | "ocaml/unirest" | "ocaml/axios" | "ocaml/fetch" | "ocaml/jquery" | "ocaml/ofetch" | "ocaml/xhr" | "ocaml/undici" | "ocaml/nsurlsession" | "ocaml/cohttp" | "ocaml/curl" | "ocaml/guzzle" | "ocaml/restmethod" | "ocaml/webrequest" | "ocaml/python3" | "ocaml/requests" | "ocaml/aiohttp" | "ocaml/httpx_sync" | "ocaml/httpx_async" | "ocaml/httr2" | "ocaml/reqwest" | "ocaml/httpie" | "ocaml/wget" | "php/laravel" | "php/libcurl" | "php/clj_http" | "php/httpclient" | "php/restsharp" | "php/http" | "php/native" | "php/http1.1" | "php/asynchttp" | "php/nethttp" | "php/okhttp" | "php/unirest" | "php/axios" | "php/fetch" | "php/jquery" | "php/ofetch" | "php/xhr" | "php/undici" | "php/nsurlsession" | "php/cohttp" | "php/curl" | "php/guzzle" | "php/restmethod" | "php/webrequest" | "php/python3" | "php/requests" | "php/aiohttp" | "php/httpx_sync" | "php/httpx_async" | "php/httr2" | "php/reqwest" | "php/httpie" | "php/wget" | "powershell/laravel" | "powershell/libcurl" | "powershell/clj_http" | "powershell/httpclient" | "powershell/restsharp" | "powershell/http" | "powershell/native" | "powershell/http1.1" | "powershell/asynchttp" | "powershell/nethttp" | "powershell/okhttp" | "powershell/unirest" | "powershell/axios" | "powershell/fetch" | "powershell/jquery" | "powershell/ofetch" | "powershell/xhr" | "powershell/undici" | "powershell/nsurlsession" | "powershell/cohttp" | "powershell/curl" | "powershell/guzzle" | "powershell/restmethod" | "powershell/webrequest" | "powershell/python3" | "powershell/requests" | "powershell/aiohttp" | "powershell/httpx_sync" | "powershell/httpx_async" | "powershell/httr2" | "powershell/reqwest" | "powershell/httpie" | "powershell/wget" | "python/laravel" | "python/libcurl" | "python/clj_http" | "python/httpclient" | "python/restsharp" | "python/http" | "python/native" | "python/http1.1" | "python/asynchttp" | "python/nethttp" | "python/okhttp" | "python/unirest" | "python/axios" | "python/fetch" | "python/jquery" | "python/ofetch" | "python/xhr" | "python/undici" | "python/nsurlsession" | "python/cohttp" | "python/curl" | "python/guzzle" | "python/restmethod" | "python/webrequest" | "python/python3" | "python/requests" | "python/aiohttp" | "python/httpx_sync" | "python/httpx_async" | "python/httr2" | "python/reqwest" | "python/httpie" | "python/wget" | "ruby/laravel" | "ruby/libcurl" | "ruby/clj_http" | "ruby/httpclient" | "ruby/restsharp" | "ruby/http" | "ruby/native" | "ruby/http1.1" | "ruby/asynchttp" | "ruby/nethttp" | "ruby/okhttp" | "ruby/unirest" | "ruby/axios" | "ruby/fetch" | "ruby/jquery" | "ruby/ofetch" | "ruby/xhr" | "ruby/undici" | "ruby/nsurlsession" | "ruby/cohttp" | "ruby/curl" | "ruby/guzzle" | "ruby/restmethod" | "ruby/webrequest" | "ruby/python3" | "ruby/requests" | "ruby/aiohttp" | "ruby/httpx_sync" | "ruby/httpx_async" | "ruby/httr2" | "ruby/reqwest" | "ruby/httpie" | "ruby/wget" | "shell/laravel" | "shell/libcurl" | "shell/clj_http" | "shell/httpclient" | "shell/restsharp" | "shell/http" | "shell/native" | "shell/http1.1" | "shell/asynchttp" | "shell/nethttp" | "shell/okhttp" | "shell/unirest" | "shell/axios" | "shell/fetch" | "shell/jquery" | "shell/ofetch" | "shell/xhr" | "shell/undici" | "shell/nsurlsession" | "shell/cohttp" | "shell/curl" | "shell/guzzle" | "shell/restmethod" | "shell/webrequest" | "shell/python3" | "shell/requests" | "shell/aiohttp" | "shell/httpx_sync" | "shell/httpx_async" | "shell/httr2" | "shell/reqwest" | "shell/httpie" | "shell/wget" | "swift/laravel" | "swift/libcurl" | "swift/clj_http" | "swift/httpclient" | "swift/restsharp" | "swift/http" | "swift/native" | "swift/http1.1" | "swift/asynchttp" | "swift/nethttp" | "swift/okhttp" | "swift/unirest" | "swift/axios" | "swift/fetch" | "swift/jquery" | "swift/ofetch" | "swift/xhr" | "swift/undici" | "swift/nsurlsession" | "swift/cohttp" | "swift/curl" | "swift/guzzle" | "swift/restmethod" | "swift/webrequest" | "swift/python3" | "swift/requests" | "swift/aiohttp" | "swift/httpx_sync" | "swift/httpx_async" | "swift/httr2" | "swift/reqwest" | "swift/httpie" | "swift/wget")[] | undefined;
479
+ defaultHttpClient?: {
480
+ targetKey: "c" | "r" | "go" | "rust" | "clojure" | "csharp" | "dart" | "fsharp" | "http" | "java" | "js" | "julia" | "kotlin" | "node" | "objc" | "ocaml" | "php" | "powershell" | "python" | "ruby" | "shell" | "swift";
481
+ clientKey: "laravel" | "fetch" | "http" | "libcurl" | "httr2" | "native" | "reqwest" | "clj_http" | "httpclient" | "restsharp" | "http1.1" | "asynchttp" | "nethttp" | "okhttp" | "unirest" | "axios" | "jquery" | "ofetch" | "xhr" | "undici" | "nsurlsession" | "cohttp" | "curl" | "guzzle" | "restmethod" | "webrequest" | "python3" | "requests" | "aiohttp" | "httpx_sync" | "httpx_async" | "httpie" | "wget";
482
+ } | undefined;
483
+ defaultRequestBodyView?: "form" | "raw" | undefined;
484
+ customCss?: string | undefined;
485
+ onServerChange?: ((input: string) => void) | undefined;
486
+ onDocumentSelect?: (() => void) | undefined;
487
+ onLoaded?: ((slug: string) => Promise<void> | void) | undefined;
488
+ onBeforeRequest?: ((input: {
489
+ request: Request;
490
+ requestBuilder: unknown;
491
+ envVariables: Record<string, string>;
492
+ }) => Promise<void> | void) | undefined;
493
+ onRequestBuilt?: ((input: {
494
+ request: Request;
495
+ requestBuilder: unknown;
496
+ envVariables: Record<string, string>;
497
+ }) => Promise<void> | void) | undefined;
498
+ onResponseReceived?: ((input: {
499
+ response: Response;
500
+ request: Request;
501
+ }) => Response | void | Promise<Response | void>) | undefined;
502
+ onShowMore?: ((tagId: string) => Promise<void> | void) | undefined;
503
+ onSidebarClick?: ((href: string) => Promise<void> | void) | undefined;
504
+ pathRouting?: {
505
+ basePath: string;
506
+ } | undefined;
507
+ mcp?: {
508
+ name?: string | undefined;
509
+ url?: string | undefined;
510
+ disabled?: boolean | undefined;
511
+ } | undefined;
512
+ generateHeadingSlug?: ((input: {
513
+ slug?: string;
514
+ }) => string) | undefined;
515
+ generateModelSlug?: ((input: {
516
+ name?: string;
517
+ }) => string) | undefined;
518
+ generateTagSlug?: ((input: {
519
+ name?: string;
520
+ }) => string) | undefined;
521
+ generateOperationSlug?: ((input: {
522
+ path: string;
523
+ operationId?: string;
524
+ method: string;
525
+ summary?: string;
526
+ }) => string) | undefined;
527
+ generateWebhookSlug?: ((input: {
528
+ name: string;
529
+ method?: string;
530
+ }) => string) | undefined;
531
+ setPageTitle?: ((input: {
532
+ title: string;
533
+ document: {
534
+ title: string;
535
+ slug: string;
536
+ };
537
+ }) => string) | undefined;
538
+ redirect?: ((input: string) => string | null | undefined) | undefined;
539
+ tagsSorter?: "alpha" | ((a: any, b: any) => number) | undefined;
540
+ operationsSorter?: "alpha" | "method" | ((a: any, b: any) => number) | undefined;
541
+ }, "showToolbar">>;
360
542
  //# sourceMappingURL=api-reference-configuration.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"api-reference-configuration.d.ts","sourceRoot":"","sources":["../../src/api-reference/api-reference-configuration.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAmB,QAAQ,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAA;AACjF,OAAO,EACL,KAAK,aAAa,EAanB,MAAM,oBAAoB,CAAA;AAO3B,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mBA2GF,aAAa,CAAC,QAAQ,CAAC;mBACvB,aAAa,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;;;;oHAYnC,MAAM,KAAK,IAAI;oHAGf,IAAI;6GAGX,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI;qHAKhD;QACN,OAAO,EAAE,OAAO,CAAA;QAChB,cAAc,EAAE,OAAO,CAAA;QACvB,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;KACrC,KAAK,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI;oHASlB;QACN,OAAO,EAAE,OAAO,CAAA;QAChB,cAAc,EAAE,OAAO,CAAA;QACvB,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;KACrC,KAAK,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI;wHAQjB;QAAE,QAAQ,EAAE,QAAQ,CAAC;QAAC,OAAO,EAAE,OAAO,CAAA;KAAE,KAAK,QAAQ,GAAG,IAAI,GAAG,OAAO,CAAC,QAAQ,GAAG,IAAI,CAAC;gHAKpE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI;mHAG5B,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI;;;;;;;;;yHA4Bz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AAI,GAAG,SAAS;gCAmCb,GAAG,KAAK,GAAG,KAAK,MAAM;iDAGG,GAAG,KAAK,GAAG,KAAK,MAAM;kBA6FvG,CAAA"}
@@ -186,6 +186,10 @@ export const apiReferenceConfigurationSchema = intersection([
186
186
  default: false,
187
187
  typeComment: 'Whether to expand all models by default. Warning: this can cause performance issues on big documents',
188
188
  }),
189
+ expandAllParameters: boolean({
190
+ default: true,
191
+ typeComment: 'Whether to show parameter details by default. Set to false to collapse each parameter.',
192
+ }),
189
193
  expandAllResponses: boolean({
190
194
  default: false,
191
195
  typeComment: 'Whether to expand all responses by default. Warning: this can cause performance issues on big documents',
@@ -216,7 +220,9 @@ export const apiReferenceConfigurationSchema = intersection([
216
220
  const OLD_PROXY_URL = 'https://api.scalar.com/request-proxy';
217
221
  const NEW_PROXY_URL = 'https://proxy.scalar.com';
218
222
  export const apiReferenceConfigurationWithSourceSchema = (rawInput) => {
219
- const input = coerce(apiReferenceConfigurationSchema, rawInput);
223
+ const parsed = coerce(apiReferenceConfigurationSchema, rawInput);
224
+ // Migration removes the deprecated field from this same configuration object.
225
+ const input = parsed;
220
226
  if (input.hideDownloadButton) {
221
227
  console.warn(`[DEPRECATED] You're using the deprecated 'hideDownloadButton' attribute. Use 'documentDownloadType: 'none'' instead.`);
222
228
  input.documentDownloadType = 'none';
@@ -254,7 +260,6 @@ export const apiReferenceConfigurationWithSourceSchema = (rawInput) => {
254
260
  if (input.showToolbar && input.showToolbar !== 'localhost') {
255
261
  console.warn(`[DEPRECATED] You're using the deprecated 'showToolbar' attribute. Use 'showDeveloperTools' instead.`);
256
262
  input.showDeveloperTools = input.showToolbar;
257
- // @ts-expect-error - We're deleting the deprecated attribute
258
263
  delete input.showToolbar;
259
264
  }
260
265
  input.modelsSectionLabel ??= DEFAULT_MODELS_SECTION_LABEL;
@@ -1 +1 @@
1
- {"version":3,"file":"reference.d.ts","sourceRoot":"","sources":["../../../src/asyncapi/3.1/reference.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,MAAM,EAA2D,MAAM,oBAAoB,CAAA;AAIzG;;;;;GAKG;AACH,MAAM,MAAM,UAAU,GAAG,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAA;AAElD;;;GAGG;AACH,eAAO,MAAM,uBAAuB;;EAKnC,CAAA;AAUD;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,yBAAyB,GAAI,QAAQ,MAAM,KAAG,MAC4D,CAAA;AAEvH,oEAAoE;AACpE,eAAO,MAAM,YAAY,GAAI,QAAQ,MAAM,KAAG,MAA4D,CAAA"}
1
+ {"version":3,"file":"reference.d.ts","sourceRoot":"","sources":["../../../src/asyncapi/3.1/reference.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,MAAM,EAA2D,MAAM,oBAAoB,CAAA;AAIzG;;;;;GAKG;AACH,MAAM,MAAM,UAAU,GAAG,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAA;AAElD;;;GAGG;AACH,eAAO,MAAM,uBAAuB;;EAKnC,CAAA;AAmBD;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,yBAAyB,GAAI,QAAQ,MAAM,KAAG,MAC4D,CAAA;AAEvH,oEAAoE;AACpE,eAAO,MAAM,YAAY,GAAI,QAAQ,MAAM,KAAG,MAA4D,CAAA"}
@@ -8,11 +8,19 @@ import { referenceExtensions } from '../../general/bundler-extensions.js';
8
8
  export const asyncApiReferenceObject = object({
9
9
  '$ref': string({ typeComment: 'REQUIRED. The reference string.' }),
10
10
  }, { typeName: 'AsyncApiReferenceObject', typeComment: 'JSON Reference for AsyncAPI components.' });
11
+ /**
12
+ * Follows a chain of references to the value at its end. References can form a loop (`A` points at
13
+ * `B` and `B` points back at `A`, or a schema points at itself), so we stop at the first reference we
14
+ * have already passed. Without that, a loop in an untrusted document overflows the stack.
15
+ */
11
16
  const e = (value) => {
12
- if (isObject(value) && '$ref' in value) {
13
- return e(value['$ref-value']);
17
+ const seen = new Set();
18
+ let current = value;
19
+ while (isObject(current) && '$ref' in current && !seen.has(current)) {
20
+ seen.add(current);
21
+ current = current['$ref-value'];
14
22
  }
15
- return value;
23
+ return current;
16
24
  };
17
25
  /**
18
26
  * Reference Object with resolved `$ref-value` and bundle extensions.
@@ -2,22 +2,30 @@ export declare const XCodeSample: import("@scalar/validation").ObjectSchema<{
2
2
  lang: import("@scalar/validation").OptionalSchema<import("@scalar/validation").StringSchema>;
3
3
  label: import("@scalar/validation").OptionalSchema<import("@scalar/validation").StringSchema>;
4
4
  source: import("@scalar/validation").StringSchema;
5
+ example: import("@scalar/validation").OptionalSchema<import("@scalar/validation").StringSchema>;
6
+ contentType: import("@scalar/validation").OptionalSchema<import("@scalar/validation").StringSchema>;
5
7
  }>;
6
8
  export declare const XCodeSamples: import("@scalar/validation").ObjectSchema<{
7
9
  'x-codeSamples': import("@scalar/validation").OptionalSchema<import("@scalar/validation").ArraySchema<import("@scalar/validation").ObjectSchema<{
8
10
  lang: import("@scalar/validation").OptionalSchema<import("@scalar/validation").StringSchema>;
9
11
  label: import("@scalar/validation").OptionalSchema<import("@scalar/validation").StringSchema>;
10
12
  source: import("@scalar/validation").StringSchema;
13
+ example: import("@scalar/validation").OptionalSchema<import("@scalar/validation").StringSchema>;
14
+ contentType: import("@scalar/validation").OptionalSchema<import("@scalar/validation").StringSchema>;
11
15
  }>>>;
12
16
  'x-code-samples': import("@scalar/validation").OptionalSchema<import("@scalar/validation").ArraySchema<import("@scalar/validation").ObjectSchema<{
13
17
  lang: import("@scalar/validation").OptionalSchema<import("@scalar/validation").StringSchema>;
14
18
  label: import("@scalar/validation").OptionalSchema<import("@scalar/validation").StringSchema>;
15
19
  source: import("@scalar/validation").StringSchema;
20
+ example: import("@scalar/validation").OptionalSchema<import("@scalar/validation").StringSchema>;
21
+ contentType: import("@scalar/validation").OptionalSchema<import("@scalar/validation").StringSchema>;
16
22
  }>>>;
17
23
  'x-custom-examples': import("@scalar/validation").OptionalSchema<import("@scalar/validation").ArraySchema<import("@scalar/validation").ObjectSchema<{
18
24
  lang: import("@scalar/validation").OptionalSchema<import("@scalar/validation").StringSchema>;
19
25
  label: import("@scalar/validation").OptionalSchema<import("@scalar/validation").StringSchema>;
20
26
  source: import("@scalar/validation").StringSchema;
27
+ example: import("@scalar/validation").OptionalSchema<import("@scalar/validation").StringSchema>;
28
+ contentType: import("@scalar/validation").OptionalSchema<import("@scalar/validation").StringSchema>;
21
29
  }>>>;
22
30
  'x-readme': import("@scalar/validation").OptionalSchema<import("@scalar/validation").ObjectSchema<{
23
31
  'code-samples': import("@scalar/validation").OptionalSchema<import("@scalar/validation").ArraySchema<import("@scalar/validation").ObjectSchema<{
@@ -43,6 +51,8 @@ export declare const XCodeSamples: import("@scalar/validation").ObjectSchema<{
43
51
  lang: import("@scalar/validation").OptionalSchema<import("@scalar/validation").StringSchema>;
44
52
  label: import("@scalar/validation").OptionalSchema<import("@scalar/validation").StringSchema>;
45
53
  source: import("@scalar/validation").StringSchema;
54
+ example: import("@scalar/validation").OptionalSchema<import("@scalar/validation").StringSchema>;
55
+ contentType: import("@scalar/validation").OptionalSchema<import("@scalar/validation").StringSchema>;
46
56
  }>>>;
47
57
  }>;
48
58
  //# sourceMappingURL=x-code-samples.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"x-code-samples.d.ts","sourceRoot":"","sources":["../../../src/extensions/operation/x-code-samples.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,WAAW;;;;EAUvB,CAAA;AA0CD,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA2BxB,CAAA"}
1
+ {"version":3,"file":"x-code-samples.d.ts","sourceRoot":"","sources":["../../../src/extensions/operation/x-code-samples.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,WAAW;;;;;;EAYvB,CAAA;AA0CD,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA2BxB,CAAA"}
@@ -4,6 +4,8 @@ export const XCodeSample = object({
4
4
  lang: optional(string({ typeComment: 'Programming language for syntax highlighting' })),
5
5
  label: optional(string({ typeComment: 'Label shown in the code sample picker' })),
6
6
  source: string({ typeComment: 'Source code for the sample' }),
7
+ example: optional(string({ typeComment: 'Request body example key used by this sample' })),
8
+ contentType: optional(string({ typeComment: 'Request body media type used by this sample' })),
7
9
  }, {
8
10
  typeName: 'XCodeSample',
9
11
  typeComment: 'A single code sample for documentation or examples',
@@ -37,16 +37,22 @@ export declare const operation: import("@scalar/validation").IntersectionSchema<
37
37
  lang: import("@scalar/validation").OptionalSchema<import("@scalar/validation").StringSchema>;
38
38
  label: import("@scalar/validation").OptionalSchema<import("@scalar/validation").StringSchema>;
39
39
  source: import("@scalar/validation").StringSchema;
40
+ example: import("@scalar/validation").OptionalSchema<import("@scalar/validation").StringSchema>;
41
+ contentType: import("@scalar/validation").OptionalSchema<import("@scalar/validation").StringSchema>;
40
42
  }>>>;
41
43
  'x-code-samples': import("@scalar/validation").OptionalSchema<import("@scalar/validation").ArraySchema<import("@scalar/validation").ObjectSchema<{
42
44
  lang: import("@scalar/validation").OptionalSchema<import("@scalar/validation").StringSchema>;
43
45
  label: import("@scalar/validation").OptionalSchema<import("@scalar/validation").StringSchema>;
44
46
  source: import("@scalar/validation").StringSchema;
47
+ example: import("@scalar/validation").OptionalSchema<import("@scalar/validation").StringSchema>;
48
+ contentType: import("@scalar/validation").OptionalSchema<import("@scalar/validation").StringSchema>;
45
49
  }>>>;
46
50
  'x-custom-examples': import("@scalar/validation").OptionalSchema<import("@scalar/validation").ArraySchema<import("@scalar/validation").ObjectSchema<{
47
51
  lang: import("@scalar/validation").OptionalSchema<import("@scalar/validation").StringSchema>;
48
52
  label: import("@scalar/validation").OptionalSchema<import("@scalar/validation").StringSchema>;
49
53
  source: import("@scalar/validation").StringSchema;
54
+ example: import("@scalar/validation").OptionalSchema<import("@scalar/validation").StringSchema>;
55
+ contentType: import("@scalar/validation").OptionalSchema<import("@scalar/validation").StringSchema>;
50
56
  }>>>;
51
57
  'x-readme': import("@scalar/validation").OptionalSchema<import("@scalar/validation").ObjectSchema<{
52
58
  'code-samples': import("@scalar/validation").OptionalSchema<import("@scalar/validation").ArraySchema<import("@scalar/validation").ObjectSchema<{
@@ -72,6 +78,8 @@ export declare const operation: import("@scalar/validation").IntersectionSchema<
72
78
  lang: import("@scalar/validation").OptionalSchema<import("@scalar/validation").StringSchema>;
73
79
  label: import("@scalar/validation").OptionalSchema<import("@scalar/validation").StringSchema>;
74
80
  source: import("@scalar/validation").StringSchema;
81
+ example: import("@scalar/validation").OptionalSchema<import("@scalar/validation").StringSchema>;
82
+ contentType: import("@scalar/validation").OptionalSchema<import("@scalar/validation").StringSchema>;
75
83
  }>>>;
76
84
  }>, import("@scalar/validation").ObjectSchema<{
77
85
  '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">]>>;
@@ -1 +1 @@
1
- {"version":3,"file":"operation.d.ts","sourceRoot":"","sources":["../../../src/openapi/3.1/operation.ts"],"names":[],"mappings":"AAqBA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAiDrB,CAAA"}
1
+ {"version":3,"file":"operation.d.ts","sourceRoot":"","sources":["../../../src/openapi/3.1/operation.ts"],"names":[],"mappings":"AAqBA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAiDrB,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"reference.d.ts","sourceRoot":"","sources":["../../../src/openapi/3.1/reference.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,MAAM,EAA2D,MAAM,oBAAoB,CAAA;AAyBzG;;;;;GAKG;AACH,eAAO,MAAM,SAAS,GAAI,OAAO,MAAM,KAAG,MAAmC,CAAA;AAU7E;;;;;GAKG;AACH,eAAO,MAAM,YAAY,GAAI,OAAO,MAAM,KAAG,MACiE,CAAA"}
1
+ {"version":3,"file":"reference.d.ts","sourceRoot":"","sources":["../../../src/openapi/3.1/reference.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,MAAM,EAA2D,MAAM,oBAAoB,CAAA;AAyBzG;;;;;GAKG;AACH,eAAO,MAAM,SAAS,GAAI,OAAO,MAAM,KAAG,MAAmC,CAAA;AAmB7E;;;;;GAKG;AACH,eAAO,MAAM,YAAY,GAAI,OAAO,MAAM,KAAG,MACiE,CAAA"}
@@ -19,11 +19,19 @@ const reference = object({
19
19
  * where references follow JSON Schema / OpenAPI schema rules only.
20
20
  */
21
21
  export const normalRef = (inner) => union([reference, inner]);
22
+ /**
23
+ * Follows a chain of references to the value at its end. References can form a loop (`A` points at
24
+ * `B` and `B` points back at `A`, or a schema points at itself), so we stop at the first reference we
25
+ * have already passed. Without that, a loop in an untrusted document overflows the stack.
26
+ */
22
27
  const e = (value) => {
23
- if (isObject(value) && '$ref' in value) {
24
- return e(value['$ref-value']);
28
+ const seen = new Set();
29
+ let current = value;
30
+ while (isObject(current) && '$ref' in current && !seen.has(current)) {
31
+ seen.add(current);
32
+ current = current['$ref-value'];
25
33
  }
26
- return value;
34
+ return current;
27
35
  };
28
36
  /**
29
37
  * Inline object or Reference Object with resolved `$ref-value` and bundle extensions.
package/package.json CHANGED
@@ -14,7 +14,7 @@
14
14
  "schemas",
15
15
  "scalar"
16
16
  ],
17
- "version": "0.10.0",
17
+ "version": "0.12.0",
18
18
  "engines": {
19
19
  "node": ">=22"
20
20
  },
@@ -41,12 +41,12 @@
41
41
  "CHANGELOG.md"
42
42
  ],
43
43
  "dependencies": {
44
- "@scalar/helpers": "0.12.0",
45
- "@scalar/validation": "0.6.3"
44
+ "@scalar/helpers": "0.14.0",
45
+ "@scalar/validation": "0.6.5"
46
46
  },
47
47
  "devDependencies": {
48
- "vitest": "4.1.10",
49
- "@scalar/types": "0.20.0"
48
+ "@scalar/types": "0.22.0",
49
+ "vitest": "4.1.10"
50
50
  },
51
51
  "scripts": {
52
52
  "build": "tsc -p tsconfig.build.json && tsc-alias -p tsconfig.build.json",