Skip to content

Commit 5127f12

Browse files
Merge pull request #1 from Econify/feature/openapi
Initial OpenAPI module
2 parents a176e67 + 69e77ef commit 5127f12

File tree

5 files changed

+679
-45
lines changed

5 files changed

+679
-45
lines changed

IMountableItem.ts

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import Router from './Router';
2+
import express from 'express';
3+
4+
export default interface IMountableItem {
5+
path: string;
6+
httpMethod: string;
7+
8+
at: (path: string) => this;
9+
10+
asExpressRoute: () => (req: express.Request, res: express.Response) => void;
11+
asKoaRoute: () => void;
12+
asMetal: () => void;
13+
14+
withOptions: (options: any) => this;
15+
16+
onMount?: (router: Router) => this
17+
}
18+
19+
export interface IMountableItemClass {
20+
new (options: any, router?: Router): IMountableItem;
21+
}

0 commit comments

Comments
 (0)