main
Last change
on this file since d565449 was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago |
Update repo after prototype presentation
|
-
Property mode
set to
100644
|
File size:
1.2 KB
|
Rev | Line | |
---|
[d565449] | 1 | {{## def.checkMissingProperty:_properties:
|
---|
| 2 | {{~ _properties:$propertyKey:$i }}
|
---|
| 3 | {{?$i}} || {{?}}
|
---|
| 4 | {{
|
---|
| 5 | var $prop = it.util.getProperty($propertyKey)
|
---|
| 6 | , $useData = $data + $prop;
|
---|
| 7 | }}
|
---|
| 8 | ( ({{# def.noPropertyInData }}) && (missing{{=$lvl}} = {{= it.util.toQuotedString(it.opts.jsonPointers ? $propertyKey : $prop) }}) )
|
---|
| 9 | {{~}}
|
---|
| 10 | #}}
|
---|
| 11 |
|
---|
| 12 |
|
---|
| 13 | {{## def.errorMissingProperty:_error:
|
---|
| 14 | {{
|
---|
| 15 | var $propertyPath = 'missing' + $lvl
|
---|
| 16 | , $missingProperty = '\' + ' + $propertyPath + ' + \'';
|
---|
| 17 | if (it.opts._errorDataPathProperty) {
|
---|
| 18 | it.errorPath = it.opts.jsonPointers
|
---|
| 19 | ? it.util.getPathExpr($currentErrorPath, $propertyPath, true)
|
---|
| 20 | : $currentErrorPath + ' + ' + $propertyPath;
|
---|
| 21 | }
|
---|
| 22 | }}
|
---|
| 23 | {{# def.error:_error }}
|
---|
| 24 | #}}
|
---|
| 25 |
|
---|
| 26 |
|
---|
| 27 | {{## def.allErrorsMissingProperty:_error:
|
---|
| 28 | {{
|
---|
| 29 | var $prop = it.util.getProperty($propertyKey)
|
---|
| 30 | , $missingProperty = it.util.escapeQuotes($propertyKey)
|
---|
| 31 | , $useData = $data + $prop;
|
---|
| 32 | if (it.opts._errorDataPathProperty) {
|
---|
| 33 | it.errorPath = it.util.getPath($currentErrorPath, $propertyKey, it.opts.jsonPointers);
|
---|
| 34 | }
|
---|
| 35 | }}
|
---|
| 36 | if ({{# def.noPropertyInData }}) {
|
---|
| 37 | {{# def.addError:_error }}
|
---|
| 38 | }
|
---|
| 39 | #}}
|
---|
Note:
See
TracBrowser
for help on using the repository browser.