@scalar/schemas 0.14.0 → 0.15.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,11 @@
1
1
  # @scalar/schemas
2
2
 
3
+ ## 0.15.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#10697](https://github.com/scalar/scalar/pull/10697): Add `urlRouting: false` to keep API reference navigation in internal state without reading or changing the host page URL.
8
+
3
9
  ## 0.14.0
4
10
 
5
11
  ### Minor Changes
@@ -134,6 +134,7 @@ export declare const apiReferenceConfigurationSchema: import("@scalar/validation
134
134
  }) => Response | void | Promise<Response | void>>>;
135
135
  onShowMore: import("@scalar/validation").OptionalSchema<import("@scalar/validation").FunctionSchema<(tagId: string) => Promise<void> | void>>;
136
136
  onSidebarClick: import("@scalar/validation").OptionalSchema<import("@scalar/validation").FunctionSchema<(href: string) => Promise<void> | void>>;
137
+ urlRouting: import("@scalar/validation").OptionalSchema<import("@scalar/validation").BooleanSchema>;
137
138
  pathRouting: import("@scalar/validation").OptionalSchema<import("@scalar/validation").ObjectSchema<{
138
139
  basePath: import("@scalar/validation").StringSchema;
139
140
  }>>;
@@ -331,6 +332,7 @@ export declare const apiReferenceConfigurationWithSourceSchema: (rawInput: unkno
331
332
  }) => Response | void | Promise<Response | void>) | undefined;
332
333
  onShowMore?: ((tagId: string) => Promise<void> | void) | undefined;
333
334
  onSidebarClick?: ((href: string) => Promise<void> | void) | undefined;
335
+ urlRouting?: boolean | undefined;
334
336
  pathRouting?: {
335
337
  basePath: string;
336
338
  } | undefined;
@@ -516,6 +518,7 @@ export declare const apiReferenceConfigurationWithSourceSchema: (rawInput: unkno
516
518
  }) => Response | void | Promise<Response | void>) | undefined;
517
519
  onShowMore?: ((tagId: string) => Promise<void> | void) | undefined;
518
520
  onSidebarClick?: ((href: string) => Promise<void> | void) | undefined;
521
+ urlRouting?: boolean | undefined;
519
522
  pathRouting?: {
520
523
  basePath: string;
521
524
  } | undefined;
@@ -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,EAenB,MAAM,oBAAoB,CAAA;AAO3B,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gBAwBvC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;mBAgGoC,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;;;;;;;;;yHA4B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,MAAM,CAAA;KAAE,KAAK,MAAM;qCAIpD;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,WAAW,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE,KAAK,MAAM;mCAKvD;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,KAAK,MAAM;4BAGnD;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE;YAAE,KAAK,EAAE,MAAM,CAAC;YAAC,IAAI,EAAE,MAAM,CAAA;SAAE,CAAA;KAAE,KAAK,MAAM;wBAG3E,MAAM,KAAK,MAAM,GAAG,IAAI,GAAG,SAAS;gCA2Cb,GAAG,KAAK,GAAG,KAAK,MAAM;iDAGG,GAAG,KAAK,GAAG,KAAK,MAAM;kBA6FvG,CAAA"}
@@ -1,6 +1,6 @@
1
1
  import { DEFAULT_MODELS_SECTION_LABEL } from '@scalar/types/api-reference';
2
2
  import { any, array, boolean, coerce, evaluate, fn, intersection, literal, number, object, optional, record, string, union, } from '@scalar/validation';
3
- import { apiReferencePluginSchema } from '../api-reference/api-reference-plugin.js';
3
+ import { apiReferencePluginSchema } from './api-reference-plugin.js';
4
4
  import { baseConfigurationSchema } from './base-configuration.js';
5
5
  import { sourceConfigurationSchema } from './source-configuration.js';
6
6
  export const apiReferenceConfigurationSchema = intersection([
@@ -141,6 +141,9 @@ export const apiReferenceConfigurationSchema = intersection([
141
141
  onSidebarClick: optional(fn(), {
142
142
  typeComment: 'onSidebarClick is fired when the user clicks on a sidebar item',
143
143
  }),
144
+ urlRouting: optional(boolean(), {
145
+ typeComment: 'Sync navigation with the browser URL. Set to false for embedded references that must leave the host URL and history alone. Defaults to true.',
146
+ }),
144
147
  pathRouting: optional(object({
145
148
  basePath: string(),
146
149
  }), {
@@ -1,6 +1,6 @@
1
1
  import { lazy, record, string } from '@scalar/validation';
2
- import { pathItem } from '../../openapi/3.1/path-item.js';
3
- import { recursiveRef } from '../../openapi/3.1/reference.js';
2
+ import { pathItem } from './path-item.js';
3
+ import { recursiveRef } from './reference.js';
4
4
  export const callback = record(string(), recursiveRef(lazy(() => pathItem)), {
5
5
  typeName: 'CallbackObject',
6
6
  });
@@ -1,15 +1,15 @@
1
1
  import { lazy, object, optional, record, string } from '@scalar/validation';
2
- import { callback } from '../../openapi/3.1/callback.js';
3
- import { example } from '../../openapi/3.1/example.js';
4
- import { link } from '../../openapi/3.1/link.js';
5
- import { header } from '../../openapi/3.1/media-type.js';
6
- import { parameter } from '../../openapi/3.1/parameter.js';
7
- import { pathItem } from '../../openapi/3.1/path-item.js';
8
- import { normalRef, recursiveRef } from '../../openapi/3.1/reference.js';
9
- import { requestBody } from '../../openapi/3.1/request-body.js';
10
- import { response } from '../../openapi/3.1/response.js';
11
- import { schema } from '../../openapi/3.1/schema.js';
12
- import { securityScheme } from '../../openapi/3.1/security-schemes.js';
2
+ import { callback } from './callback.js';
3
+ import { example } from './example.js';
4
+ import { link } from './link.js';
5
+ import { header } from './media-type.js';
6
+ import { parameter } from './parameter.js';
7
+ import { pathItem } from './path-item.js';
8
+ import { normalRef, recursiveRef } from './reference.js';
9
+ import { requestBody } from './request-body.js';
10
+ import { response } from './response.js';
11
+ import { schema } from './schema.js';
12
+ import { securityScheme } from './security-schemes.js';
13
13
  export const components = lazy(() => object({
14
14
  schemas: optional(record(string(), normalRef(schema), { typeName: 'ComponentsSchemas' })),
15
15
  responses: optional(record(string(), recursiveRef(lazy(() => response)), { typeName: 'ComponentsResponses' })),
@@ -3,14 +3,14 @@ import { XOriginalOasVersion, XScalarEnvironments, XScalarIcon, XScalarIsDirty,
3
3
  import { XPostResponse, XPreRequest, XScalarActiveEnvironment, XScalarCookies, XScalarOrder, } from '../../extensions/general/index.js';
4
4
  import { XScalarSelectedServer } from '../../extensions/server/index.js';
5
5
  import { XTagGroups } from '../../extensions/tag/index.js';
6
- import { components } from '../../openapi/3.1/components.js';
7
- import { externalDocs } from '../../openapi/3.1/external-docs.js';
8
- import { info } from '../../openapi/3.1/info.js';
9
- import { pathItem } from '../../openapi/3.1/path-item.js';
10
- import { recursiveRef } from '../../openapi/3.1/reference.js';
11
- import { securityRequirement } from '../../openapi/3.1/security-requirement.js';
12
- import { server } from '../../openapi/3.1/server.js';
13
- import { tag } from '../../openapi/3.1/tag.js';
6
+ import { components } from './components.js';
7
+ import { externalDocs } from './external-docs.js';
8
+ import { info } from './info.js';
9
+ import { pathItem } from './path-item.js';
10
+ import { recursiveRef } from './reference.js';
11
+ import { securityRequirement } from './security-requirement.js';
12
+ import { server } from './server.js';
13
+ import { tag } from './tag.js';
14
14
  const openapiExtensions = intersection([
15
15
  XOriginalOasVersion,
16
16
  XScalarNavigation,
@@ -1,7 +1,7 @@
1
1
  import { intersection, object, optional, string } from '@scalar/validation';
2
2
  import { XScalarLinks, XScalarSdkInstallation } from '../../extensions/document/index.js';
3
- import { contact } from '../../openapi/3.1/contact.js';
4
- import { license } from '../../openapi/3.1/license.js';
3
+ import { contact } from './contact.js';
4
+ import { license } from './license.js';
5
5
  export const info = intersection([
6
6
  object({
7
7
  title: string({ typeComment: 'REQUIRED. The title of the API.' }),
@@ -1,5 +1,5 @@
1
1
  import { any, object, optional, record, string } from '@scalar/validation';
2
- import { server } from '../../openapi/3.1/server.js';
2
+ import { server } from './server.js';
3
3
  export const link = object({
4
4
  operationRef: optional(string({
5
5
  typeComment: 'A URI reference to an OAS operation. This field is mutually exclusive of the operationId field, and MUST point to an Operation Object.',
@@ -1,7 +1,7 @@
1
1
  import { any, boolean, intersection, lazy, object, optional, record, string, union, } from '@scalar/validation';
2
- import { example } from '../../openapi/3.1/example.js';
3
- import { normalRef, recursiveRef } from '../../openapi/3.1/reference.js';
4
- import { schema } from '../../openapi/3.1/schema.js';
2
+ import { example } from './example.js';
3
+ import { normalRef, recursiveRef } from './reference.js';
4
+ import { schema } from './schema.js';
5
5
  const headerBase = object({
6
6
  description: optional(string({
7
7
  typeComment: 'A brief description of the header. This could contain examples of use. CommonMark syntax MAY be used for rich text representation.',
@@ -3,14 +3,14 @@ import { XInternal, XScalarIgnore } from '../../extensions/document/index.js';
3
3
  import { XPostResponse, XPreRequest } from '../../extensions/general/index.js';
4
4
  import { XBadges, XCodeSamples, XDraftExamples, XScalarDisableParameters, XScalarStability, } from '../../extensions/operation/index.js';
5
5
  import { XScalarSelectedServer } from '../../extensions/server/index.js';
6
- import { callback } from '../../openapi/3.1/callback.js';
7
- import { externalDocs } from '../../openapi/3.1/external-docs.js';
8
- import { parameter } from '../../openapi/3.1/parameter.js';
9
- import { recursiveRef } from '../../openapi/3.1/reference.js';
10
- import { requestBody } from '../../openapi/3.1/request-body.js';
11
- import { responsesObject } from '../../openapi/3.1/response.js';
12
- import { securityRequirement } from '../../openapi/3.1/security-requirement.js';
13
- import { server } from '../../openapi/3.1/server.js';
6
+ import { callback } from './callback.js';
7
+ import { externalDocs } from './external-docs.js';
8
+ import { parameter } from './parameter.js';
9
+ import { recursiveRef } from './reference.js';
10
+ import { requestBody } from './request-body.js';
11
+ import { responsesObject } from './response.js';
12
+ import { securityRequirement } from './security-requirement.js';
13
+ import { server } from './server.js';
14
14
  export const operation = intersection([
15
15
  object({
16
16
  tags: optional(array(string(), {
@@ -1,10 +1,10 @@
1
1
  import { any, boolean, intersection, lazy, literal, object, optional, record, string, union } from '@scalar/validation';
2
2
  import { XInternal, XScalarIgnore } from '../../extensions/document/index.js';
3
3
  import { XGlobal } from '../../extensions/parameter/index.js';
4
- import { example } from '../../openapi/3.1/example.js';
5
- import { mediaType } from '../../openapi/3.1/media-type.js';
6
- import { normalRef, recursiveRef } from '../../openapi/3.1/reference.js';
7
- import { schema } from '../../openapi/3.1/schema.js';
4
+ import { example } from './example.js';
5
+ import { mediaType } from './media-type.js';
6
+ import { normalRef, recursiveRef } from './reference.js';
7
+ import { schema } from './schema.js';
8
8
  const parameterWithSchema = intersection([
9
9
  object({
10
10
  name: string({
@@ -1,8 +1,8 @@
1
1
  import { array, lazy, object, optional, string } from '@scalar/validation';
2
- import { operation } from '../../openapi/3.1/operation.js';
3
- import { parameter } from '../../openapi/3.1/parameter.js';
4
- import { recursiveRef } from '../../openapi/3.1/reference.js';
5
- import { server } from '../../openapi/3.1/server.js';
2
+ import { operation } from './operation.js';
3
+ import { parameter } from './parameter.js';
4
+ import { recursiveRef } from './reference.js';
5
+ import { server } from './server.js';
6
6
  export const pathItem = object({
7
7
  $ref: optional(string({
8
8
  typeComment: 'Allows for a referenced definition of this path item. The value MUST be in the form of a URI, and the referenced structure MUST be in the form of a Path Item Object.',
@@ -1,6 +1,6 @@
1
1
  import { boolean, intersection, lazy, object, optional, record, string } from '@scalar/validation';
2
2
  import { XScalarSelectedContentType } from '../../extensions/operation/index.js';
3
- import { mediaType } from '../../openapi/3.1/media-type.js';
3
+ import { mediaType } from './media-type.js';
4
4
  export const requestBody = intersection([
5
5
  object({
6
6
  description: optional(string({
@@ -1,7 +1,7 @@
1
1
  import { lazy, object, optional, record, string } from '@scalar/validation';
2
- import { link } from '../../openapi/3.1/link.js';
3
- import { header, mediaType } from '../../openapi/3.1/media-type.js';
4
- import { recursiveRef } from '../../openapi/3.1/reference.js';
2
+ import { link } from './link.js';
3
+ import { header, mediaType } from './media-type.js';
4
+ import { recursiveRef } from './reference.js';
5
5
  export const response = object({
6
6
  description: string({
7
7
  typeComment: 'REQUIRED. A description of the response. CommonMark syntax MAY be used for rich text representation.',
@@ -1,10 +1,10 @@
1
1
  import { any, array, boolean, intersection, lazy, literal, number, object, optional, record, string, union, } from '@scalar/validation';
2
2
  import { XInternal, XScalarIgnore, XTags } from '../../extensions/document/index.js';
3
3
  import { XAdditionalPropertiesName, XEnumDescriptions, XEnumVarNames, XExamples, XVariable } from '../../extensions/schema/index.js';
4
- import { discriminatorObject } from '../../openapi/3.1/discriminator.js';
5
- import { externalDocs } from '../../openapi/3.1/external-docs.js';
6
- import { normalRef } from '../../openapi/3.1/reference.js';
7
- import { xml } from '../../openapi/3.1/xml.js';
4
+ import { discriminatorObject } from './discriminator.js';
5
+ import { externalDocs } from './external-docs.js';
6
+ import { normalRef } from './reference.js';
7
+ import { xml } from './xml.js';
8
8
  /**
9
9
  * Build the shared Schema Object shape, optionally accepting boolean child schemas.
10
10
  * AsyncAPI uses JSON Schema booleans recursively; the OpenAPI ingestion pipeline normalizes them first.
@@ -1,5 +1,5 @@
1
1
  import { object, optional, record, string } from '@scalar/validation';
2
- import { serverVariable } from '../../openapi/3.1/server-variable.js';
2
+ import { serverVariable } from './server-variable.js';
3
3
  export const server = object({
4
4
  url: string({
5
5
  typeComment: 'REQUIRED. A URL to the target host. This URL supports Server Variables and MAY be relative, to indicate that the host location is relative to the location where the document containing the Server Object is being served. Variable substitutions will be made when a variable is named in {braces}.',
@@ -2,7 +2,7 @@ import { intersection, object, optional, string } from '@scalar/validation';
2
2
  import { XInternal, XScalarIgnore } from '../../extensions/document/index.js';
3
3
  import { XScalarOrder } from '../../extensions/general/index.js';
4
4
  import { XDisplayName } from '../../extensions/tag/index.js';
5
- import { externalDocs } from '../../openapi/3.1/external-docs.js';
5
+ import { externalDocs } from './external-docs.js';
6
6
  export const tag = intersection([
7
7
  object({
8
8
  name: string({ typeComment: 'REQUIRED. The name of the tag.' }),
package/package.json CHANGED
@@ -14,7 +14,7 @@
14
14
  "schemas",
15
15
  "scalar"
16
16
  ],
17
- "version": "0.14.0",
17
+ "version": "0.15.0",
18
18
  "engines": {
19
19
  "node": ">=22"
20
20
  },
@@ -45,8 +45,8 @@
45
45
  "@scalar/validation": "0.6.7"
46
46
  },
47
47
  "devDependencies": {
48
- "@scalar/types": "0.24.0",
49
- "vitest": "4.1.10"
48
+ "@scalar/types": "0.25.0",
49
+ "vitest": "4.1.12"
50
50
  },
51
51
  "scripts": {
52
52
  "build": "tsc -p tsconfig.build.json && tsc-alias -p tsconfig.build.json",