This commit is contained in:
tamaina 2023-05-10 15:58:46 +00:00
parent 3e13bb4cd7
commit 0e08c56bc7

View file

@ -1,51 +1,51 @@
import type { JSONSchema7Definition } from 'schema-type';
export const packedPageSchema = { export const packedPageSchema = {
$id: 'https://misskey-hub.net/api/schemas/Page',
type: 'object', type: 'object',
properties: { properties: {
id: { id: { $ref: 'https://misskey-hub.net/api/schemas/Id' },
type: 'string',
optional: false, nullable: false,
format: 'id',
example: 'xxxxxxxxxx',
},
createdAt: { createdAt: {
type: 'string', type: 'string',
optional: false, nullable: false,
format: 'date-time', format: 'date-time',
}, },
updatedAt: { updatedAt: {
type: 'string', type: 'string',
optional: false, nullable: false,
format: 'date-time', format: 'date-time',
}, },
title: { title: {
type: 'string', type: 'string',
optional: false, nullable: false,
}, },
name: { name: {
type: 'string', type: 'string',
optional: false, nullable: false,
}, },
summary: { summary: {
type: 'string', type: ['string', 'null'],
optional: false, nullable: true,
}, },
content: { content: {
type: 'array', type: 'array',
optional: false, nullable: false,
}, },
variables: { variables: {
type: 'array', type: 'array',
optional: false, nullable: false, items: {
},
userId: {
type: 'string',
optional: false, nullable: false,
format: 'id',
},
user: {
type: 'object', type: 'object',
ref: 'UserLite', additionalProperties: true,
optional: false, nullable: false,
}, },
}, },
} as const; userId: { $ref: 'https://misskey-hub.net/api/schemas/Id' },
user: { $ref: 'https://misskey-hub.net/api/schemas/UserLite' },
},
required: [
'id',
'createdAt',
'updatedAt',
'title',
'name',
'summary',
'content',
'variables',
'userId',
'user',
],
} as const satisfies JSONSchema7Definition;