This commit is contained in:
tamaina 2023-05-15 09:19:36 +00:00
parent 03a2501b45
commit ca29fdc795
1 changed files with 32 additions and 8 deletions

View File

@ -283,7 +283,12 @@ export const endpoints = {
properties: { properties: {
title: { type: 'string', minLength: 1 }, title: { type: 'string', minLength: 1 },
text: { type: 'string', minLength: 1 }, text: { type: 'string', minLength: 1 },
imageUrl: { type: 'string', nullable: true, minLength: 1 }, imageUrl: {
oneOf: [
{ type: 'string', minLength: 1 },
{ type: 'null' },
],
},
}, },
required: ['title', 'text', 'imageUrl'], required: ['title', 'text', 'imageUrl'],
}, },
@ -362,7 +367,12 @@ export const endpoints = {
id: { type: 'string', format: 'misskey:id' }, id: { type: 'string', format: 'misskey:id' },
title: { type: 'string', minLength: 1 }, title: { type: 'string', minLength: 1 },
text: { type: 'string', minLength: 1 }, text: { type: 'string', minLength: 1 },
imageUrl: { type: 'string', nullable: true, minLength: 1 }, imageUrl: {
oneOf: [
{ type: 'string', minLength: 1 },
{ type: 'null' },
],
},
}, },
required: ['id', 'title', 'text', 'imageUrl'], required: ['id', 'title', 'text', 'imageUrl'],
}, },
@ -404,15 +414,29 @@ export const endpoints = {
limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 }, limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 },
sinceId: { type: 'string', format: 'misskey:id' }, sinceId: { type: 'string', format: 'misskey:id' },
untilId: { type: 'string', format: 'misskey:id' }, untilId: { type: 'string', format: 'misskey:id' },
userId: { type: 'string', format: 'misskey:id', nullable: true }, userId: {
type: { type: 'string', nullable: true, pattern: /^[a-zA-Z0-9\/\-*]+$/.toString().slice(1, -1) }, oneOf: [
{ type: 'string', format: 'misskey:id' },
{ type: 'null' },
],
},
type: {
oneOf: [
{ type: 'string', pattern: /^[a-zA-Z0-9\/\-*]+$/.toString().slice(1, -1) },
{ type: 'null' },
],
},
origin: { type: 'string', enum: ['combined', 'local', 'remote'], default: 'local' }, origin: { type: 'string', enum: ['combined', 'local', 'remote'], default: 'local' },
hostname: { hostname: {
oneOf: [
{
type: 'string', type: 'string',
nullable: true,
default: null, default: null,
description: 'The local host is represented with `null`.', description: 'The local host is represented with `null`.',
}, },
{ type: 'null' },
],
},
}, },
required: [], required: [],
}, },