diff --git a/packages/backend/src/models/json-schema/drive-file.ts b/packages/backend/src/models/json-schema/drive-file.ts index 87f1340812..7b65c2142c 100644 --- a/packages/backend/src/models/json-schema/drive-file.ts +++ b/packages/backend/src/models/json-schema/drive-file.ts @@ -74,7 +74,7 @@ export const packedDriveFileSchema = { }, url: { type: 'string', - optional: false, nullable: true, + optional: false, nullable: false, format: 'url', }, thumbnailUrl: { @@ -94,7 +94,7 @@ export const packedDriveFileSchema = { }, folder: { type: 'object', - optional: true, nullable: true, + optional: false, nullable: true, ref: 'DriveFolder', }, userId: { @@ -105,7 +105,7 @@ export const packedDriveFileSchema = { }, user: { type: 'object', - optional: true, nullable: true, + optional: false, nullable: true, ref: 'UserLite', }, }, diff --git a/packages/backend/src/models/json-schema/drive-folder.ts b/packages/backend/src/models/json-schema/drive-folder.ts index aaad301303..36f8a791ae 100644 --- a/packages/backend/src/models/json-schema/drive-folder.ts +++ b/packages/backend/src/models/json-schema/drive-folder.ts @@ -37,7 +37,7 @@ export const packedDriveFolderSchema = { }, parent: { type: 'object', - optional: true, nullable: true, + optional: true, nullable: false, ref: 'DriveFolder', }, }, diff --git a/packages/backend/src/models/json-schema/page.ts b/packages/backend/src/models/json-schema/page.ts index 3ae07f3c1c..9baacd6884 100644 --- a/packages/backend/src/models/json-schema/page.ts +++ b/packages/backend/src/models/json-schema/page.ts @@ -35,10 +35,18 @@ export const packedPageSchema = { content: { type: 'array', optional: false, nullable: false, + items: { + type: 'object', + optional: false, nullable: false, + }, }, variables: { type: 'array', optional: false, nullable: false, + items: { + type: 'object', + optional: false, nullable: false, + }, }, title: { type: 'string', diff --git a/packages/backend/src/models/json-schema/user.ts b/packages/backend/src/models/json-schema/user.ts index 30489b0b63..4767f51e27 100644 --- a/packages/backend/src/models/json-schema/user.ts +++ b/packages/backend/src/models/json-schema/user.ts @@ -124,7 +124,7 @@ export const packedUserLiteSchema = { nullable: false, optional: false, }, iconUrl: { - type: 'number', + type: 'string', nullable: true, optional: false, }, displayOrder: { @@ -153,18 +153,15 @@ export const packedUserDetailedNotMeOnlySchema = { movedTo: { type: 'string', format: 'uri', - nullable: true, - optional: false, + nullable: true, optional: false, }, alsoKnownAs: { type: 'array', - nullable: true, - optional: false, + nullable: true, optional: false, items: { type: 'string', format: 'id', - nullable: false, - optional: false, + nullable: false, optional: false, }, }, createdAt: { @@ -359,11 +356,11 @@ export const packedUserDetailedNotMeOnlySchema = { }, memo: { type: 'string', - nullable: false, optional: true, + nullable: true, optional: false, }, moderationNote: { type: 'string', - nullable: true, optional: true, + nullable: false, optional: true, }, //#region relations isFollowing: { @@ -433,27 +430,27 @@ export const packedMeDetailedOnlySchema = { }, injectFeaturedNote: { type: 'boolean', - nullable: true, optional: false, + nullable: false, optional: false, }, receiveAnnouncementEmail: { type: 'boolean', - nullable: true, optional: false, + nullable: false, optional: false, }, alwaysMarkNsfw: { type: 'boolean', - nullable: true, optional: false, + nullable: false, optional: false, }, autoSensitive: { type: 'boolean', - nullable: true, optional: false, + nullable: false, optional: false, }, carefulBot: { type: 'boolean', - nullable: true, optional: false, + nullable: false, optional: false, }, autoAcceptFollowed: { type: 'boolean', - nullable: true, optional: false, + nullable: false, optional: false, }, noCrawle: { type: 'boolean', @@ -538,7 +535,7 @@ export const packedMeDetailedOnlySchema = { }, emailNotificationTypes: { type: 'array', - nullable: true, optional: false, + nullable: false, optional: false, items: { type: 'string', nullable: false, optional: false,