@scalar/schemas 0.3.1 → 0.3.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 CHANGED
@@ -1,5 +1,11 @@
1
1
  # @scalar/schemas
2
2
 
3
+ ## 0.3.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [#9313](https://github.com/scalar/scalar/pull/9313): feat: add AsyncAPI connection URL builder and server list helpers
8
+
3
9
  ## 0.3.1
4
10
 
5
11
  ### Patch Changes
@@ -46,5 +46,7 @@ export declare const asyncApiObjectSchema: import("@scalar/validation").Intersec
46
46
  conflictCheckedAgainstHash: import("@scalar/validation").OptionalSchema<import("@scalar/validation").StringSchema>;
47
47
  hasConflict: import("@scalar/validation").OptionalSchema<import("@scalar/validation").BooleanSchema>;
48
48
  }>>;
49
+ }>, import("@scalar/validation").ObjectSchema<{
50
+ 'x-scalar-selected-server': import("@scalar/validation").OptionalSchema<import("@scalar/validation").StringSchema>;
49
51
  }>]>]>;
50
52
  //# sourceMappingURL=asyncapi-object.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"asyncapi-object.d.ts","sourceRoot":"","sources":["../../../src/asyncapi/3.1/asyncapi-object.ts"],"names":[],"mappings":"AA8DA;;;;GAIG;AACH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAG/B,CAAA"}
1
+ {"version":3,"file":"asyncapi-object.d.ts","sourceRoot":"","sources":["../../../src/asyncapi/3.1/asyncapi-object.ts"],"names":[],"mappings":"AAgEA;;;;GAIG;AACH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAG/B,CAAA"}
@@ -1,5 +1,6 @@
1
1
  import { intersection, object, optional, string } from '@scalar/validation';
2
2
  import { XOriginalAasVersion, XScalarIsDirty, XScalarNavigation, XScalarOriginalDocumentHash, XScalarOriginalSourceUrl, XScalarRegistryMeta, XScalarWatchMode, } from '../../extensions/document/index.js';
3
+ import { XScalarSelectedServer } from '../../extensions/server/index.js';
3
4
  import { asyncApiChannelsObject } from './channel.js';
4
5
  import { asyncApiComponentsObject } from './components.js';
5
6
  import { asyncApiInfoObject } from './info.js';
@@ -14,6 +15,7 @@ const asyncApiExtensions = intersection([
14
15
  XScalarIsDirty,
15
16
  XScalarWatchMode,
16
17
  XScalarRegistryMeta,
18
+ XScalarSelectedServer,
17
19
  ], {
18
20
  typeName: 'AsyncApiExtensions',
19
21
  typeComment: 'AsyncAPI document-level Scalar extensions shared with workspace tooling.',
@@ -1 +1 @@
1
- {"version":3,"file":"x-scalar-selected-server.d.ts","sourceRoot":"","sources":["../../../src/extensions/server/x-scalar-selected-server.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,qBAAqB;;EAWjC,CAAA"}
1
+ {"version":3,"file":"x-scalar-selected-server.d.ts","sourceRoot":"","sources":["../../../src/extensions/server/x-scalar-selected-server.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,qBAAqB;;EAmBjC,CAAA"}
@@ -1,10 +1,12 @@
1
1
  import { object, optional, string } from '@scalar/validation';
2
2
  import { typeCommentWithExample } from '../type-comment.js';
3
3
  export const XScalarSelectedServer = object({
4
- 'x-scalar-selected-server': optional(string({ typeComment: 'The URL of the currently selected server' })),
4
+ 'x-scalar-selected-server': optional(string({
5
+ typeComment: 'The currently selected server. For OpenAPI documents this is the server URL; for AsyncAPI documents this is the server name (key in `document.servers`).',
6
+ })),
5
7
  }, {
6
8
  typeName: 'XScalarSelectedServer',
7
- typeComment: typeCommentWithExample('The URL of the currently selected server for this API description.', {
9
+ typeComment: typeCommentWithExample('The currently selected server for this API description. For OpenAPI documents the value is the server URL; for AsyncAPI documents the value is the server name (key in `document.servers`).', {
8
10
  language: 'yaml',
9
11
  body: 'x-scalar-selected-server: https://api.example.com',
10
12
  }),
package/package.json CHANGED
@@ -14,7 +14,7 @@
14
14
  "schemas",
15
15
  "scalar"
16
16
  ],
17
- "version": "0.3.1",
17
+ "version": "0.3.2",
18
18
  "engines": {
19
19
  "node": ">=22"
20
20
  },
@@ -46,7 +46,7 @@
46
46
  },
47
47
  "devDependencies": {
48
48
  "vitest": "4.1.0",
49
- "@scalar/types": "0.12.1"
49
+ "@scalar/types": "0.12.2"
50
50
  },
51
51
  "scripts": {
52
52
  "build": "tsc -p tsconfig.build.json && tsc-alias -p tsconfig.build.json",