-
Notifications
You must be signed in to change notification settings - Fork 2
/
verify-model-def.js
44 lines (24 loc) · 1015 Bytes
/
verify-model-def.js
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
module.exports = {
friendlyName: 'Verify model def',
description: 'Verify that the specified model definition is compatible with this adapter.',
extendedDescription: 'This assumes that the provided model def has already undergone adapter-agnostic normalization, and is considered generally valid.',
sideEffects: 'cacheable',
sync: true,
inputs: {
modelDef: {
description: 'A Waterline model definition.',
extendedDescription: 'This model definition should already be fully-formed (i.e. it should have undergone generic normalization/validation already).',
moreInfoUrl: 'http://sailsjs.com/documentation/concepts/models-and-orm/models',
example: '===',// {}
readOnly: true,
required: true
}
},
exits: {
invalid: {
description: 'The provided model definition was invalid.',
outputFriendlyName: 'Error',
outputExample: '==='// e.g. new Error('Primary key attribute should have `columnName: \'_id\'`.')
}
},
};