-
Notifications
You must be signed in to change notification settings - Fork 0
/
TODO
52 lines (38 loc) · 1.6 KB
/
TODO
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
::::: MISSING TESTS ::
* [FEATURE]: Mount only specified/allowed models/types:
- Example:
app.use(API(Post, Article)
app.use(API(Post, Article, {route: '/api'}))
app.use(API(Post, Article, {route: '/api', methods: ['get']}))
app.use(API(Post, Article, {methods: ['get']}))
app.use(API({route: '/api'}))
app.use(API({route: '/api', methods: ['get']}))
app.use(API({methods: ['get']}))
* Tests for both mounting classes and routes.
::::: CURRENT/NEXT ::
- [FEATURE]: Write middleware env variable so that other middlewares can use these parsed parameters to modify the response to custom format.
- Example:
app
.use(function(req, res, next) {
if (res.api) {
res.setHeader('X-Document-Args', [res.api.args.type, res.api.args.id].join('/')); // dumb example
}
})
.use(API())
::::: HIGH ::
- [FEATURE]: List records by type - requires `node-document`/`node-document-storage` support for this.
- Example:
GET /posts
- [FEATURE]: List - requires `node-document`/`node-document-storage` support for this.
- Example:
GET /_types
- [FEATURE]: Ability to mount GUI on top of the API (which itself talks to the API via AJAX) - requires `node-document-gui` implementation and integration.
- Example:
GET /post/new
GET /post/1/edit
GET /post/1,2,3/edit
::::: LOW ::
- [FEATURE]: Mount an instance?
- Example:
API(Document('Site').get(1), {route: /site})
GET /site