Skip to content

Commit c29d100

Browse files
feat: add any schema
1 parent 1660697 commit c29d100

2 files changed

Lines changed: 16 additions & 0 deletions

File tree

src/schemas/any.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import * as z from "zod";
2+
3+
import * as v0_1 from "./0.1.js";
4+
import * as v0_2 from "./0.2.js";
5+
import * as v0_3 from "./0.3.js";
6+
7+
/**
8+
* Union schema that accepts any supported manifest version (0.1, 0.2, 0.3).
9+
* Use this when you need to validate manifests of any version.
10+
*/
11+
export const McpbManifestSchema = z.union([
12+
v0_1.McpbManifestSchema,
13+
v0_2.McpbManifestSchema,
14+
v0_3.McpbManifestSchema,
15+
]);

src/schemas/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
export * as v0_1 from "./0.1.js";
22
export * as v0_2 from "./0.2.js";
33
export * as v0_3 from "./0.3.js";
4+
export * as any from "./any.js";
45
export * as latest from "./latest.js";
56
export {
67
MANIFEST_VERSION as LATEST_MANIFEST_VERSION,

0 commit comments

Comments
 (0)