api.jsonの出力結果の正確性を修正

This commit is contained in:
GrapeApple0 2024-08-15 13:42:41 +00:00
parent 715c29a559
commit c5286a4174
1 changed files with 28 additions and 0 deletions

View File

@ -89,6 +89,34 @@ export const paramDef = {
required: ['choices'], required: ['choices'],
}, },
}, },
// (re)note with text, files and poll are optional
if: {
properties: {
renoteId: {
type: 'null',
},
fileIds: {
type: 'null',
},
mediaIds: {
type: 'null',
},
poll: {
type: 'null',
},
},
},
then: {
properties: {
text: {
type: 'string',
minLength: 1,
maxLength: MAX_NOTE_TEXT_LENGTH,
pattern: '[^\\s]+',
},
},
required: ['text'],
},
required: ['noteId', 'text', 'cw'], required: ['noteId', 'text', 'cw'],
} as const; } as const;