diff --git a/packages/backend/src/models/Page.ts b/packages/backend/src/models/Page.ts index d27d35944d..34817f2c2d 100644 --- a/packages/backend/src/models/Page.ts +++ b/packages/backend/src/models/Page.ts @@ -121,6 +121,15 @@ export class MiPage { export const pageNameSchema = { type: 'string', pattern: /^[a-zA-Z0-9_-]{1,256}$/.source } as const; +//#region ページブロックのスキーマ(バリデーション用) + +/** + * 併せてpackedPageBlockSchemaも更新すること + * (そっちはAPIの戻り型の定義なので以下の定義とは若干異なる) + * + * packages/backend/src/models/json-schema/page.ts + */ + const blockBaseSchema = { type: 'object', properties: { @@ -222,3 +231,5 @@ export const pageBlockSchema = { noteBlockSchema, ], } as const; + +//#endregion diff --git a/packages/backend/src/models/json-schema/page.ts b/packages/backend/src/models/json-schema/page.ts index 0fe1ca5901..c7a36453f4 100644 --- a/packages/backend/src/models/json-schema/page.ts +++ b/packages/backend/src/models/json-schema/page.ts @@ -3,6 +3,13 @@ * SPDX-License-Identifier: AGPL-3.0-only */ +/** + * ページブロックのスキーマを変更したら、併せてpageBlockSchemaも更新すること + * (そっちは入力バリデーション用の定義なので以下の定義とは若干異なる) + * + * packages/backend/src/models/Page.ts + */ + const packedBlockBaseSchema = { type: 'object', properties: {