git ssb

0+

Piet / ssb-loomio



Commit 7520a969a39fb3590cb018c3ce4a61457ba569bc

Wip

Piet Geursen committed on 3/8/2018, 3:25:15 AM
Parent: ac1a79fec1e45652d23a6905c8540851a850a868

Files changed

types.jschanged
errors/schema/error.jsadded
errors/sync/error.jsadded
errors/sync/isError.jsadded
errors/sync/isPositionChoiceError.jsadded
errors/sync/isPositionLateError.jsadded
errors/sync/isPositionTypeError.jsadded
errors/sync/positionChoiceError.jsadded
errors/sync/positionLateError.jsadded
errors/sync/positionTypeError.jsadded
types.jsView
@@ -1,9 +1,9 @@
11 module.exports = {
22 CHOOSE_ONE: 'chooseOne',
33 ERROR_POSITION_TYPE: 'ERROR_POSITION_TYPE',
44 ERROR_POSITION_LATE: 'ERROR_POSITION_LATE',
5- ERROR_POSTITION_CHOICE: 'ERROR_POSTITION_CHOICE'
5+ ERROR_POSITION_CHOICE: 'ERROR_POSITION_CHOICE'
66 }
77
88 // Question: do these need to be different, could we just have 'chooseOne',
99 // because we already have:
errors/schema/error.jsView
@@ -1,0 +1,40 @@
1+const { ERROR_POSITION_CHOICE, ERROR_POSITION_TYPE, ERROR_POSITION_LATE } = require('../../types')
2+
3+var schema = {
4+ type: 'object',
5+ required: ['type', 'position', 'message'],
6+ properties: {
7+ type: {
8+ type: 'string',
9+ oneOf: [
10+ {
11+ type: 'string',
12+ pattern: `^${ERROR_POSITION_CHOICE}$`
13+
14+ },
15+ {
16+
17+ },
18+ {
19+
20+ },
21+ ERROR_POSITION_CHOICE,
22+ ERROR_POSITION_TYPE,
23+ ERROR_POSITION_LATE
24+ ]
25+ },
26+ position: {
27+ type: 'object'
28+ },
29+ message: {
30+ type: 'string'
31+ },
32+ definitions: {
33+ errorTypePatterns: {
34+
35+ }
36+ }
37+ }
38+}
39+
40+module.exports = schema
errors/sync/error.jsView
errors/sync/isError.jsView
errors/sync/isPositionChoiceError.jsView
errors/sync/isPositionLateError.jsView
errors/sync/isPositionTypeError.jsView
errors/sync/positionChoiceError.jsView
errors/sync/positionLateError.jsView
errors/sync/positionTypeError.jsView

Built with git-ssb-web