1
1
mirror of https://github.com/kokonect-link/cherrypick synced 2024-12-11 13:18:54 +09:00

Improve doc

This commit is contained in:
syuilo 2019-02-24 19:42:26 +09:00
parent 02e4929a97
commit b67f3438e9
No known key found for this signature in database
GPG Key ID: BDC4C49D06AB9D69
10 changed files with 133 additions and 6 deletions

View File

@ -30,7 +30,14 @@ export const meta = {
validator: $.optional.type(ID),
transform: transform,
},
}
},
res: {
type: 'array',
items: {
type: 'Blocking',
}
},
};
export default define(meta, async (ps, me) => {

View File

@ -30,7 +30,14 @@ export const meta = {
validator: $.optional.type(ID),
transform: transform,
},
}
},
res: {
type: 'array',
items: {
type: 'Muting',
}
},
};
export default define(meta, async (ps, me) => {

View File

@ -67,7 +67,14 @@ export const meta = {
validator: $.optional.type(ID),
transform: transform,
},
}
},
res: {
type: 'array',
items: {
type: 'Note',
}
},
};
export default define(meta, async (ps) => {

View File

@ -53,7 +53,14 @@ export const meta = {
]),
default: 'local'
}
}
},
res: {
type: 'array',
items: {
type: 'User',
}
},
};
const state: any = { // < https://github.com/Microsoft/TypeScript/issues/1863

View File

@ -52,6 +52,23 @@ export const meta = {
}
},
res: {
type: 'object',
properties: {
users: {
type: 'array',
items: {
type: 'User',
}
},
next: {
type: 'string',
format: 'id',
nullable: true
}
}
},
errors: {
noSuchUser: {
message: 'No such user.',

View File

@ -52,6 +52,23 @@ export const meta = {
}
},
res: {
type: 'object',
properties: {
users: {
type: 'array',
items: {
type: 'User',
}
},
next: {
type: 'string',
format: 'id',
nullable: true
}
}
},
errors: {
noSuchUser: {
message: 'No such user.',

View File

@ -29,6 +29,13 @@ export const meta = {
},
},
res: {
type: 'array',
items: {
type: 'User',
}
},
errors: {
noSuchUser: {
message: 'No such user.',

View File

@ -31,7 +31,14 @@ export const meta = {
validator: $.optional.num.min(0),
default: 0
}
}
},
res: {
type: 'array',
items: {
type: 'User',
}
},
};
export default define(meta, async (ps, me) => {

View File

@ -52,6 +52,13 @@ export const meta = {
}
},
},
res: {
type: 'array',
items: {
type: 'User',
}
},
};
export default define(meta, async (ps, me) => {

View File

@ -221,5 +221,49 @@ export const schemas = {
},
},
required: ['id', 'createdAt', 'name', 'type', 'datasize', 'md5']
}
},
Muting: {
type: 'object',
properties: {
id: {
type: 'string',
format: 'id',
description: 'The unique identifier for this mute.',
example: 'xxxxxxxxxxxxxxxxxxxxxxxx',
},
createdAt: {
type: 'string',
format: 'date-time',
description: 'The date that the mute was created.'
},
mutee: {
$ref: '#/components/schemas/User',
description: 'The mutee.'
},
},
required: ['id', 'createdAt', 'mutee']
},
Blocking: {
type: 'object',
properties: {
id: {
type: 'string',
format: 'id',
description: 'The unique identifier for this block.',
example: 'xxxxxxxxxxxxxxxxxxxxxxxx',
},
createdAt: {
type: 'string',
format: 'date-time',
description: 'The date that the block was created.'
},
blockee: {
$ref: '#/components/schemas/User',
description: 'The blockee.'
},
},
required: ['id', 'createdAt', 'blockee']
},
};