summaryrefslogtreecommitdiff
path: root/src/server/api/endpoints.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/api/endpoints.ts')
-rw-r--r--src/server/api/endpoints.ts22
1 files changed, 17 insertions, 5 deletions
diff --git a/src/server/api/endpoints.ts b/src/server/api/endpoints.ts
index 6765a63e9f..2873dd3c1e 100644
--- a/src/server/api/endpoints.ts
+++ b/src/server/api/endpoints.ts
@@ -2,18 +2,30 @@ import { Context } from 'cafy';
import * as path from 'path';
import * as glob from 'glob';
+export type Param = {
+ validator: Context<any>;
+ transform?: any;
+ default?: any;
+ desc?: { [key: string]: string };
+ ref?: string;
+};
+
export interface IEndpointMeta {
stability?: string; //'deprecated' | 'experimental' | 'stable';
desc?: { [key: string]: string };
+ tags?: string[];
+
params?: {
+ [key: string]: Param;
+ };
+
+ errors?: {
[key: string]: {
- validator: Context<any>;
- transform?: any;
- default?: any;
- desc?: { [key: string]: string };
- ref?: string;
+ message: string;
+ code: string;
+ id: string;
};
};