From 5d74726b11b176b9d655f62096ca30b8624d5116 Mon Sep 17 00:00:00 2001 From: arvinxx Date: Fri, 15 Dec 2023 11:38:09 +0800 Subject: [PATCH] :bug: fix: improve pluginSchema types --- src/schema/manifest.ts | 1 + src/types/manifest.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/src/schema/manifest.ts b/src/schema/manifest.ts index 9289a89..61fe821 100644 --- a/src/schema/manifest.ts +++ b/src/schema/manifest.ts @@ -2,6 +2,7 @@ import { z } from 'zod'; const JSONSchema = z.object({ properties: z.object({}), + required: z.array(z.string()).optional(), type: z.enum(['object']), }); export const pluginApiSchema = z.object({ diff --git a/src/types/manifest.ts b/src/types/manifest.ts index bd9f9f4..9d3641d 100644 --- a/src/types/manifest.ts +++ b/src/types/manifest.ts @@ -13,6 +13,7 @@ export interface PluginSchema extends Omit { properties: { [key: string]: JSONSchema7; }; + required?: string[]; type: 'object'; }