Skip to content
Snippets Groups Projects
Unverified Commit 78df3dc4 authored by Johann150's avatar Johann150 Committed by GitHub
Browse files

enhance: improve documentation for `/users/` endpoints (#8790)

* docs: category & description for reset password

* docs: category & description for testing

* docs: descriptions for groups endpoints

* docs: descriptions for drive file endpoints

* docs: descriptions for sw endpoints

* docs: descriptions for user list endpoints

* docs: descriptions & result type for gallery posts

* docs: descriptions & result type for user endpoints

* docs: add return type for stats
parent 527f0440
No related branches found
No related tags found
No related merge requests found
Showing
with 68 additions and 0 deletions
......@@ -9,6 +9,8 @@ export const meta = {
kind: 'read:drive',
description: 'Find the notes to which the given file is attached.',
res: {
type: 'array',
optional: false, nullable: false,
......
......@@ -8,6 +8,8 @@ export const meta = {
kind: 'read:drive',
description: 'Check if a given file exists.',
res: {
type: 'boolean',
optional: false, nullable: false,
......
......@@ -20,6 +20,8 @@ export const meta = {
kind: 'write:drive',
description: 'Upload a new drive file.',
res: {
type: 'object',
optional: false, nullable: false,
......
......@@ -11,6 +11,8 @@ export const meta = {
kind: 'write:drive',
description: 'Delete an existing drive file.',
errors: {
noSuchFile: {
message: 'No such file.',
......
......@@ -8,6 +8,8 @@ export const meta = {
kind: 'read:drive',
description: 'Search for a drive file by a hash of the contents.',
res: {
type: 'array',
optional: false, nullable: false,
......
......@@ -9,6 +9,8 @@ export const meta = {
kind: 'read:drive',
description: 'Search for a drive file by the given parameters.',
res: {
type: 'array',
optional: false, nullable: false,
......
......@@ -10,6 +10,8 @@ export const meta = {
kind: 'read:drive',
description: 'Show the properties of a drive file.',
res: {
type: 'object',
optional: false, nullable: false,
......
......@@ -11,6 +11,8 @@ export const meta = {
kind: 'write:drive',
description: 'Update the properties of a drive file.',
errors: {
invalidFileName: {
message: 'Invalid file name.',
......
......@@ -13,6 +13,8 @@ export const meta = {
max: 60,
},
description: 'Request the server to download a new drive file from the specified URL.',
requireCredential: true,
kind: 'write:drive',
......
......@@ -10,8 +10,12 @@ import { genId } from '@/misc/gen-id.js';
import { IsNull } from 'typeorm';
export const meta = {
tags: ['reset password'],
requireCredential: false,
description: 'Request a users password to be reset.',
limit: {
duration: ms('1hour'),
max: 3,
......
......@@ -3,8 +3,12 @@ import { ApiError } from '../error.js';
import { resetDb } from '@/db/postgre.js';
export const meta = {
tags: ['non-productive'],
requireCredential: false,
description: 'Only available when running with <code>NODE_ENV=testing</code>. Reset the database and flush Redis.',
errors: {
},
......
......@@ -5,8 +5,12 @@ import { Users, UserProfiles, PasswordResetRequests } from '@/models/index.js';
import { ApiError } from '../error.js';
export const meta = {
tags: ['reset password'],
requireCredential: false,
description: 'Complete the password reset that was previously requested.',
errors: {
},
......
......@@ -8,6 +8,8 @@ export const meta = {
requireCredential: true,
description: 'Register to receive push notifications.',
res: {
type: 'object',
optional: false, nullable: false,
......
......@@ -5,6 +5,8 @@ export const meta = {
tags: ['account'],
requireCredential: true,
description: 'Unregister from receiving push notifications.',
} as const;
export const paramDef = {
......
import define from '../define.js';
export const meta = {
tags: ['non-productive'],
description: 'Endpoint for testing input validation.',
requireCredential: false,
} as const;
......
......@@ -4,6 +4,18 @@ import { makePaginationQuery } from '../../common/make-pagination-query.js';
export const meta = {
tags: ['users', 'clips'],
description: 'Show all clips this user owns.',
res: {
type: 'array',
optional: false, nullable: false,
items: {
type: 'object',
optional: false, nullable: false,
ref: 'Clip',
},
},
} as const;
export const paramDef = {
......
......@@ -10,6 +10,8 @@ export const meta = {
requireCredential: false,
description: 'Show everyone that follows this user.',
res: {
type: 'array',
optional: false, nullable: false,
......
......@@ -10,6 +10,8 @@ export const meta = {
requireCredential: false,
description: 'Show everyone that this user is following.',
res: {
type: 'array',
optional: false, nullable: false,
......
......@@ -4,6 +4,18 @@ import { makePaginationQuery } from '../../../common/make-pagination-query.js';
export const meta = {
tags: ['users', 'gallery'],
description: 'Show all gallery posts by the given user.',
res: {
type: 'array',
optional: false, nullable: false,
items: {
type: 'object',
optional: false, nullable: false,
ref: 'GalleryPost',
},
},
} as const;
export const paramDef = {
......
......@@ -10,6 +10,8 @@ export const meta = {
requireCredential: false,
description: 'Get a list of other users that the specified user frequently replies to.',
res: {
type: 'array',
optional: false, nullable: false,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment