jxp 2.14.6 → 2.15.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -36,21 +36,40 @@ block content
36
36
  th Default
37
37
  th Indexed?
38
38
  th Unique?
39
+ th Required?
39
40
  tbody
40
41
  each fieldname in fields
41
- - let field = model.schema.paths[fieldname]
42
+ - let field = safeFields[fieldname]
42
43
  if (field.path)
43
44
  tr
44
45
  td= field.path
45
- td= field.instance
46
+ td
47
+ if field.arrayType
48
+ | Array of #{field.arrayType}
49
+ else
50
+ = field.instance
46
51
  td= field.options.link
47
52
  td= field.options.map_to
48
53
  td= field.defaultValue
49
54
  td= (field.options.index) ? "x" : ""
50
55
  td= (field.options.unique) ? "x" : ""
56
+ td= field.isRequired ? "x" : ""
51
57
  hr
52
- h1 Raw definition
58
+ h2 Field Details
53
59
  each fieldname in fields
54
- - let field = model.schema.paths[fieldname]
55
- pre.pre= JSON.stringify(field, null, "\t")
60
+ - let field = safeFields[fieldname]
61
+ if field
62
+ .field-details
63
+ h3= field.path
64
+ pre.pre= JSON.stringify(field, null, 2)
65
+ if field.schema
66
+ h4 Nested Schema
67
+ ul
68
+ each nestedField in field.schema
69
+ li #{nestedField.path}: #{nestedField.type}
70
+ if field.validators && field.validators.length
71
+ h4 Validators
72
+ ul
73
+ each validator in field.validators
74
+ li #{validator.type}: #{validator.message}
56
75