add comment
This commit is contained in:
parent
2aa3139dbe
commit
10f6b28790
|
@ -121,6 +121,15 @@ export class MiPage {
|
||||||
|
|
||||||
export const pageNameSchema = { type: 'string', pattern: /^[a-zA-Z0-9_-]{1,256}$/.source } as const;
|
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 = {
|
const blockBaseSchema = {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
properties: {
|
properties: {
|
||||||
|
@ -222,3 +231,5 @@ export const pageBlockSchema = {
|
||||||
noteBlockSchema,
|
noteBlockSchema,
|
||||||
],
|
],
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
|
//#endregion
|
||||||
|
|
|
@ -3,6 +3,13 @@
|
||||||
* SPDX-License-Identifier: AGPL-3.0-only
|
* SPDX-License-Identifier: AGPL-3.0-only
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ページブロックのスキーマを変更したら、併せてpageBlockSchemaも更新すること
|
||||||
|
* (そっちは入力バリデーション用の定義なので以下の定義とは若干異なる)
|
||||||
|
*
|
||||||
|
* packages/backend/src/models/Page.ts
|
||||||
|
*/
|
||||||
|
|
||||||
const packedBlockBaseSchema = {
|
const packedBlockBaseSchema = {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
properties: {
|
properties: {
|
||||||
|
|
Loading…
Reference in New Issue