@jsonforms/core 3.0.0-alpha.3 → 3.0.0-beta.2

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.
Files changed (206) hide show
  1. package/docs/assets/js/search.json +1 -1
  2. package/docs/globals.html +207 -165
  3. package/docs/index.html +7 -4
  4. package/docs/interfaces/arraycontrolprops.html +21 -21
  5. package/docs/interfaces/arraylayoutprops.html +21 -21
  6. package/docs/interfaces/cellprops.html +12 -12
  7. package/docs/interfaces/combinatorrendererprops.html +143 -36
  8. package/docs/interfaces/controlprops.html +16 -16
  9. package/docs/interfaces/controlstate.html +2 -2
  10. package/docs/interfaces/controlwithdetailprops.html +17 -17
  11. package/docs/interfaces/dispatchcellprops.html +10 -10
  12. package/docs/interfaces/dispatchcellstateprops.html +10 -10
  13. package/docs/interfaces/dispatchpropsofarraycontrol.html +4 -4
  14. package/docs/interfaces/dispatchpropsofcontrol.html +1 -1
  15. package/docs/interfaces/dispatchpropsofmultienumcontrol.html +2 -2
  16. package/docs/interfaces/enumcellprops.html +13 -13
  17. package/docs/interfaces/enumoption.html +2 -2
  18. package/docs/interfaces/jsonformsprops.html +9 -9
  19. package/docs/interfaces/layoutprops.html +10 -10
  20. package/docs/interfaces/ownpropsofcell.html +9 -9
  21. package/docs/interfaces/ownpropsofcontrol.html +9 -12
  22. package/docs/interfaces/ownpropsofenum.html +1 -1
  23. package/docs/interfaces/ownpropsofenumcell.html +10 -10
  24. package/docs/interfaces/ownpropsofjsonformsrenderer.html +8 -8
  25. package/docs/interfaces/ownpropsoflayout.html +9 -9
  26. package/docs/interfaces/ownpropsofmasterlistitem.html +6 -6
  27. package/docs/interfaces/ownpropsofrenderer.html +8 -8
  28. package/docs/interfaces/rendererprops.html +9 -9
  29. package/docs/interfaces/statepropsofarraycontrol.html +17 -17
  30. package/docs/interfaces/statepropsofarraylayout.html +17 -17
  31. package/docs/interfaces/statepropsofcell.html +11 -11
  32. package/docs/interfaces/statepropsofcombinator.html +147 -40
  33. package/docs/interfaces/statepropsofcontrol.html +18 -15
  34. package/docs/interfaces/statepropsofcontrolwithdetail.html +16 -16
  35. package/docs/interfaces/statepropsofenumcell.html +12 -12
  36. package/docs/interfaces/statepropsofjsonformsrenderer.html +9 -9
  37. package/docs/interfaces/statepropsoflayout.html +10 -10
  38. package/docs/interfaces/statepropsofmasteritem.html +7 -7
  39. package/docs/interfaces/statepropsofrenderer.html +9 -9
  40. package/docs/interfaces/statepropsofscopedrenderer.html +12 -12
  41. package/docs/interfaces/withclassname.html +1 -1
  42. package/lib/Helpers.d.ts +5 -5
  43. package/lib/actions/actions.d.ts +181 -181
  44. package/lib/actions/index.d.ts +1 -1
  45. package/lib/configDefault.d.ts +6 -6
  46. package/lib/generators/Generate.d.ts +6 -6
  47. package/lib/generators/index.d.ts +3 -3
  48. package/lib/generators/schema.d.ts +8 -8
  49. package/lib/generators/uischema.d.ts +12 -12
  50. package/lib/i18n/i18nTypes.d.ts +15 -15
  51. package/lib/i18n/i18nUtil.d.ts +18 -18
  52. package/lib/i18n/index.d.ts +2 -2
  53. package/lib/index.d.ts +11 -11
  54. package/lib/jsonforms-core.cjs.js +2441 -0
  55. package/lib/jsonforms-core.cjs.js.map +1 -0
  56. package/lib/jsonforms-core.esm.js +2152 -0
  57. package/lib/jsonforms-core.esm.js.map +1 -0
  58. package/lib/models/draft4.d.ts +198 -198
  59. package/lib/models/index.d.ts +5 -5
  60. package/lib/models/jsonSchema.d.ts +3 -3
  61. package/lib/models/jsonSchema4.d.ts +110 -110
  62. package/lib/models/jsonSchema7.d.ts +119 -119
  63. package/lib/models/uischema.d.ts +201 -201
  64. package/lib/reducers/cells.d.ts +11 -11
  65. package/lib/reducers/config.d.ts +3 -3
  66. package/lib/reducers/core.d.ts +24 -24
  67. package/lib/reducers/default-data.d.ts +10 -10
  68. package/lib/reducers/i18n.d.ts +8 -8
  69. package/lib/reducers/index.d.ts +9 -9
  70. package/lib/reducers/reducers.d.ts +29 -29
  71. package/lib/reducers/renderers.d.ts +10 -10
  72. package/lib/reducers/selectors.d.ts +15 -15
  73. package/lib/reducers/uischemas.d.ts +10 -10
  74. package/lib/store.d.ts +53 -53
  75. package/lib/testers/index.d.ts +1 -1
  76. package/lib/testers/testers.d.ts +204 -203
  77. package/lib/util/Formatted.d.ts +19 -19
  78. package/lib/util/array.d.ts +3 -3
  79. package/lib/util/cell.d.ts +79 -79
  80. package/lib/util/combinators.d.ts +9 -10
  81. package/lib/util/ids.d.ts +3 -3
  82. package/lib/util/index.d.ts +15 -15
  83. package/lib/util/label.d.ts +9 -9
  84. package/lib/util/path.d.ts +35 -25
  85. package/lib/util/renderer.d.ts +398 -397
  86. package/lib/util/resolvers.d.ts +25 -25
  87. package/lib/util/runtime.d.ts +18 -18
  88. package/lib/util/schema.d.ts +1 -1
  89. package/lib/util/type.d.ts +174 -174
  90. package/lib/util/uischema.d.ts +5 -5
  91. package/lib/util/util.d.ts +31 -31
  92. package/lib/util/validator.d.ts +3 -3
  93. package/package.json +16 -13
  94. package/rollup.config.js +44 -0
  95. package/src/generators/uischema.ts +4 -4
  96. package/src/reducers/reducers.ts +14 -6
  97. package/src/testers/testers.ts +60 -33
  98. package/src/util/cell.ts +4 -4
  99. package/src/util/combinators.ts +17 -32
  100. package/src/util/label.ts +2 -2
  101. package/src/util/path.ts +18 -6
  102. package/src/util/renderer.ts +22 -36
  103. package/src/util/resolvers.ts +57 -68
  104. package/src/util/util.ts +1 -1
  105. package/stats.html +3279 -0
  106. package/test/generators/uischema.test.ts +18 -0
  107. package/test/testers.test.ts +208 -120
  108. package/test/util/path.test.ts +37 -20
  109. package/test/util/resolvers.test.ts +99 -8
  110. package/lib/Helpers.js +0 -33
  111. package/lib/Helpers.js.map +0 -1
  112. package/lib/actions/actions.js +0 -173
  113. package/lib/actions/actions.js.map +0 -1
  114. package/lib/actions/index.js +0 -29
  115. package/lib/actions/index.js.map +0 -1
  116. package/lib/configDefault.js +0 -48
  117. package/lib/configDefault.js.map +0 -1
  118. package/lib/generators/Generate.js +0 -35
  119. package/lib/generators/Generate.js.map +0 -1
  120. package/lib/generators/index.js +0 -31
  121. package/lib/generators/index.js.map +0 -1
  122. package/lib/generators/schema.js +0 -154
  123. package/lib/generators/schema.js.map +0 -1
  124. package/lib/generators/uischema.js +0 -169
  125. package/lib/generators/uischema.js.map +0 -1
  126. package/lib/i18n/i18nTypes.js +0 -3
  127. package/lib/i18n/i18nTypes.js.map +0 -1
  128. package/lib/i18n/i18nUtil.js +0 -71
  129. package/lib/i18n/i18nUtil.js.map +0 -1
  130. package/lib/i18n/index.js +0 -6
  131. package/lib/i18n/index.js.map +0 -1
  132. package/lib/index.js +0 -40
  133. package/lib/index.js.map +0 -1
  134. package/lib/jsonforms-core.js +0 -25
  135. package/lib/jsonforms-core.js.map +0 -1
  136. package/lib/models/draft4.js +0 -174
  137. package/lib/models/draft4.js.map +0 -1
  138. package/lib/models/index.js +0 -33
  139. package/lib/models/index.js.map +0 -1
  140. package/lib/models/jsonSchema.js +0 -27
  141. package/lib/models/jsonSchema.js.map +0 -1
  142. package/lib/models/jsonSchema4.js +0 -30
  143. package/lib/models/jsonSchema4.js.map +0 -1
  144. package/lib/models/jsonSchema7.js +0 -30
  145. package/lib/models/jsonSchema7.js.map +0 -1
  146. package/lib/models/uischema.js +0 -58
  147. package/lib/models/uischema.js.map +0 -1
  148. package/lib/reducers/cells.js +0 -42
  149. package/lib/reducers/cells.js.map +0 -1
  150. package/lib/reducers/config.js +0 -46
  151. package/lib/reducers/config.js.map +0 -1
  152. package/lib/reducers/core.js +0 -294
  153. package/lib/reducers/core.js.map +0 -1
  154. package/lib/reducers/default-data.js +0 -45
  155. package/lib/reducers/default-data.js.map +0 -1
  156. package/lib/reducers/i18n.js +0 -83
  157. package/lib/reducers/i18n.js.map +0 -1
  158. package/lib/reducers/index.js +0 -37
  159. package/lib/reducers/index.js.map +0 -1
  160. package/lib/reducers/reducers.js +0 -98
  161. package/lib/reducers/reducers.js.map +0 -1
  162. package/lib/reducers/renderers.js +0 -43
  163. package/lib/reducers/renderers.js.map +0 -1
  164. package/lib/reducers/selectors.js +0 -56
  165. package/lib/reducers/selectors.js.map +0 -1
  166. package/lib/reducers/uischemas.js +0 -60
  167. package/lib/reducers/uischemas.js.map +0 -1
  168. package/lib/store.js +0 -27
  169. package/lib/store.js.map +0 -1
  170. package/lib/testers/index.js +0 -29
  171. package/lib/testers/index.js.map +0 -1
  172. package/lib/testers/testers.js +0 -421
  173. package/lib/testers/testers.js.map +0 -1
  174. package/lib/util/Formatted.js +0 -27
  175. package/lib/util/Formatted.js.map +0 -1
  176. package/lib/util/array.js +0 -44
  177. package/lib/util/array.js.map +0 -1
  178. package/lib/util/cell.js +0 -148
  179. package/lib/util/cell.js.map +0 -1
  180. package/lib/util/combinators.js +0 -59
  181. package/lib/util/combinators.js.map +0 -1
  182. package/lib/util/ids.js +0 -54
  183. package/lib/util/ids.js.map +0 -1
  184. package/lib/util/index.js +0 -43
  185. package/lib/util/index.js.map +0 -1
  186. package/lib/util/label.js +0 -73
  187. package/lib/util/label.js.map +0 -1
  188. package/lib/util/path.js +0 -90
  189. package/lib/util/path.js.map +0 -1
  190. package/lib/util/renderer.js +0 -530
  191. package/lib/util/renderer.js.map +0 -1
  192. package/lib/util/resolvers.js +0 -169
  193. package/lib/util/resolvers.js.map +0 -1
  194. package/lib/util/runtime.js +0 -167
  195. package/lib/util/runtime.js.map +0 -1
  196. package/lib/util/schema.js +0 -42
  197. package/lib/util/schema.js.map +0 -1
  198. package/lib/util/type.js +0 -27
  199. package/lib/util/type.js.map +0 -1
  200. package/lib/util/uischema.js +0 -56
  201. package/lib/util/uischema.js.map +0 -1
  202. package/lib/util/util.js +0 -112
  203. package/lib/util/util.js.map +0 -1
  204. package/lib/util/validator.js +0 -37
  205. package/lib/util/validator.js.map +0 -1
  206. package/webpack.build.js +0 -13
@@ -1,198 +1,198 @@
1
- export declare const Draft4: {
2
- id: string;
3
- $schema: string;
4
- description: string;
5
- definitions: {
6
- schemaArray: {
7
- type: string;
8
- minItems: number;
9
- items: {
10
- $ref: string;
11
- };
12
- };
13
- positiveInteger: {
14
- type: string;
15
- minimum: number;
16
- };
17
- positiveIntegerDefault0: {
18
- allOf: ({
19
- $ref: string;
20
- default?: undefined;
21
- } | {
22
- default: number;
23
- $ref?: undefined;
24
- })[];
25
- };
26
- simpleTypes: {
27
- enum: string[];
28
- };
29
- stringArray: {
30
- type: string;
31
- items: {
32
- type: string;
33
- };
34
- minItems: number;
35
- uniqueItems: boolean;
36
- };
37
- };
38
- type: string;
39
- properties: {
40
- id: {
41
- type: string;
42
- format: string;
43
- };
44
- $schema: {
45
- type: string;
46
- format: string;
47
- };
48
- title: {
49
- type: string;
50
- };
51
- description: {
52
- type: string;
53
- };
54
- default: {};
55
- multipleOf: {
56
- type: string;
57
- minimum: number;
58
- exclusiveMinimum: boolean;
59
- };
60
- maximum: {
61
- type: string;
62
- };
63
- exclusiveMaximum: {
64
- type: string;
65
- default: boolean;
66
- };
67
- minimum: {
68
- type: string;
69
- };
70
- exclusiveMinimum: {
71
- type: string;
72
- default: boolean;
73
- };
74
- maxLength: {
75
- $ref: string;
76
- };
77
- minLength: {
78
- $ref: string;
79
- };
80
- pattern: {
81
- type: string;
82
- format: string;
83
- };
84
- additionalItems: {
85
- anyOf: ({
86
- type: string;
87
- $ref?: undefined;
88
- } | {
89
- $ref: string;
90
- type?: undefined;
91
- })[];
92
- default: {};
93
- };
94
- items: {
95
- anyOf: {
96
- $ref: string;
97
- }[];
98
- default: {};
99
- };
100
- maxItems: {
101
- $ref: string;
102
- };
103
- minItems: {
104
- $ref: string;
105
- };
106
- uniqueItems: {
107
- type: string;
108
- default: boolean;
109
- };
110
- maxProperties: {
111
- $ref: string;
112
- };
113
- minProperties: {
114
- $ref: string;
115
- };
116
- required: {
117
- $ref: string;
118
- };
119
- additionalProperties: {
120
- anyOf: ({
121
- type: string;
122
- $ref?: undefined;
123
- } | {
124
- $ref: string;
125
- type?: undefined;
126
- })[];
127
- default: {};
128
- };
129
- definitions: {
130
- type: string;
131
- additionalProperties: {
132
- $ref: string;
133
- };
134
- default: {};
135
- };
136
- properties: {
137
- type: string;
138
- additionalProperties: {
139
- $ref: string;
140
- };
141
- default: {};
142
- };
143
- patternProperties: {
144
- type: string;
145
- additionalProperties: {
146
- $ref: string;
147
- };
148
- default: {};
149
- };
150
- dependencies: {
151
- type: string;
152
- additionalProperties: {
153
- anyOf: {
154
- $ref: string;
155
- }[];
156
- };
157
- };
158
- enum: {
159
- type: string;
160
- minItems: number;
161
- uniqueItems: boolean;
162
- };
163
- type: {
164
- anyOf: ({
165
- $ref: string;
166
- type?: undefined;
167
- items?: undefined;
168
- minItems?: undefined;
169
- uniqueItems?: undefined;
170
- } | {
171
- type: string;
172
- items: {
173
- $ref: string;
174
- };
175
- minItems: number;
176
- uniqueItems: boolean;
177
- $ref?: undefined;
178
- })[];
179
- };
180
- allOf: {
181
- $ref: string;
182
- };
183
- anyOf: {
184
- $ref: string;
185
- };
186
- oneOf: {
187
- $ref: string;
188
- };
189
- not: {
190
- $ref: string;
191
- };
192
- };
193
- dependencies: {
194
- exclusiveMaximum: string[];
195
- exclusiveMinimum: string[];
196
- };
197
- default: {};
198
- };
1
+ export declare const Draft4: {
2
+ id: string;
3
+ $schema: string;
4
+ description: string;
5
+ definitions: {
6
+ schemaArray: {
7
+ type: string;
8
+ minItems: number;
9
+ items: {
10
+ $ref: string;
11
+ };
12
+ };
13
+ positiveInteger: {
14
+ type: string;
15
+ minimum: number;
16
+ };
17
+ positiveIntegerDefault0: {
18
+ allOf: ({
19
+ $ref: string;
20
+ default?: undefined;
21
+ } | {
22
+ default: number;
23
+ $ref?: undefined;
24
+ })[];
25
+ };
26
+ simpleTypes: {
27
+ enum: string[];
28
+ };
29
+ stringArray: {
30
+ type: string;
31
+ items: {
32
+ type: string;
33
+ };
34
+ minItems: number;
35
+ uniqueItems: boolean;
36
+ };
37
+ };
38
+ type: string;
39
+ properties: {
40
+ id: {
41
+ type: string;
42
+ format: string;
43
+ };
44
+ $schema: {
45
+ type: string;
46
+ format: string;
47
+ };
48
+ title: {
49
+ type: string;
50
+ };
51
+ description: {
52
+ type: string;
53
+ };
54
+ default: {};
55
+ multipleOf: {
56
+ type: string;
57
+ minimum: number;
58
+ exclusiveMinimum: boolean;
59
+ };
60
+ maximum: {
61
+ type: string;
62
+ };
63
+ exclusiveMaximum: {
64
+ type: string;
65
+ default: boolean;
66
+ };
67
+ minimum: {
68
+ type: string;
69
+ };
70
+ exclusiveMinimum: {
71
+ type: string;
72
+ default: boolean;
73
+ };
74
+ maxLength: {
75
+ $ref: string;
76
+ };
77
+ minLength: {
78
+ $ref: string;
79
+ };
80
+ pattern: {
81
+ type: string;
82
+ format: string;
83
+ };
84
+ additionalItems: {
85
+ anyOf: ({
86
+ type: string;
87
+ $ref?: undefined;
88
+ } | {
89
+ $ref: string;
90
+ type?: undefined;
91
+ })[];
92
+ default: {};
93
+ };
94
+ items: {
95
+ anyOf: {
96
+ $ref: string;
97
+ }[];
98
+ default: {};
99
+ };
100
+ maxItems: {
101
+ $ref: string;
102
+ };
103
+ minItems: {
104
+ $ref: string;
105
+ };
106
+ uniqueItems: {
107
+ type: string;
108
+ default: boolean;
109
+ };
110
+ maxProperties: {
111
+ $ref: string;
112
+ };
113
+ minProperties: {
114
+ $ref: string;
115
+ };
116
+ required: {
117
+ $ref: string;
118
+ };
119
+ additionalProperties: {
120
+ anyOf: ({
121
+ type: string;
122
+ $ref?: undefined;
123
+ } | {
124
+ $ref: string;
125
+ type?: undefined;
126
+ })[];
127
+ default: {};
128
+ };
129
+ definitions: {
130
+ type: string;
131
+ additionalProperties: {
132
+ $ref: string;
133
+ };
134
+ default: {};
135
+ };
136
+ properties: {
137
+ type: string;
138
+ additionalProperties: {
139
+ $ref: string;
140
+ };
141
+ default: {};
142
+ };
143
+ patternProperties: {
144
+ type: string;
145
+ additionalProperties: {
146
+ $ref: string;
147
+ };
148
+ default: {};
149
+ };
150
+ dependencies: {
151
+ type: string;
152
+ additionalProperties: {
153
+ anyOf: {
154
+ $ref: string;
155
+ }[];
156
+ };
157
+ };
158
+ enum: {
159
+ type: string;
160
+ minItems: number;
161
+ uniqueItems: boolean;
162
+ };
163
+ type: {
164
+ anyOf: ({
165
+ $ref: string;
166
+ type?: undefined;
167
+ items?: undefined;
168
+ minItems?: undefined;
169
+ uniqueItems?: undefined;
170
+ } | {
171
+ type: string;
172
+ items: {
173
+ $ref: string;
174
+ };
175
+ minItems: number;
176
+ uniqueItems: boolean;
177
+ $ref?: undefined;
178
+ })[];
179
+ };
180
+ allOf: {
181
+ $ref: string;
182
+ };
183
+ anyOf: {
184
+ $ref: string;
185
+ };
186
+ oneOf: {
187
+ $ref: string;
188
+ };
189
+ not: {
190
+ $ref: string;
191
+ };
192
+ };
193
+ dependencies: {
194
+ exclusiveMaximum: string[];
195
+ exclusiveMinimum: string[];
196
+ };
197
+ default: {};
198
+ };
@@ -1,5 +1,5 @@
1
- export * from './draft4';
2
- export * from './jsonSchema';
3
- export * from './jsonSchema4';
4
- export * from './jsonSchema7';
5
- export * from './uischema';
1
+ export * from './draft4';
2
+ export * from './jsonSchema';
3
+ export * from './jsonSchema4';
4
+ export * from './jsonSchema7';
5
+ export * from './uischema';
@@ -1,3 +1,3 @@
1
- import { JsonSchema4 } from './jsonSchema4';
2
- import { JsonSchema7 } from './jsonSchema7';
3
- export declare type JsonSchema = JsonSchema4 | JsonSchema7;
1
+ import { JsonSchema4 } from './jsonSchema4';
2
+ import { JsonSchema7 } from './jsonSchema7';
3
+ export declare type JsonSchema = JsonSchema4 | JsonSchema7;
@@ -1,110 +1,110 @@
1
- export interface JsonSchema4 {
2
- $ref?: string;
3
- /**
4
- * This is important because it tells refs where
5
- * the root of the document is located
6
- */
7
- id?: string;
8
- /**
9
- * It is recommended that the meta-schema is
10
- * included in the root of any JSON Schema
11
- */
12
- $schema?: string;
13
- /**
14
- * Title of the schema
15
- */
16
- title?: string;
17
- /**
18
- * Schema description
19
- */
20
- description?: string;
21
- /**
22
- * Default json for the object represented by
23
- * this schema
24
- */
25
- default?: any;
26
- /**
27
- * The value must be a multiple of the number
28
- * (e.g. 10 is a multiple of 5)
29
- */
30
- multipleOf?: number;
31
- maximum?: number;
32
- /**
33
- * If true maximum must be > value, >= otherwise
34
- */
35
- exclusiveMaximum?: boolean;
36
- minimum?: number;
37
- /**
38
- * If true minimum must be < value, <= otherwise
39
- */
40
- exclusiveMinimum?: boolean;
41
- maxLength?: number;
42
- minLength?: number;
43
- /**
44
- * This is a regex string that the value must
45
- * conform to
46
- */
47
- pattern?: string;
48
- additionalItems?: boolean | JsonSchema4;
49
- items?: JsonSchema4 | JsonSchema4[];
50
- maxItems?: number;
51
- minItems?: number;
52
- uniqueItems?: boolean;
53
- maxProperties?: number;
54
- minProperties?: number;
55
- required?: string[];
56
- additionalProperties?: boolean | JsonSchema4;
57
- /**
58
- * Holds simple JSON Schema definitions for
59
- * referencing from elsewhere.
60
- */
61
- definitions?: {
62
- [key: string]: JsonSchema4;
63
- };
64
- /**
65
- * The keys that can exist on the object with the
66
- * json schema that should validate their value
67
- */
68
- properties?: {
69
- [property: string]: JsonSchema4;
70
- };
71
- /**
72
- * The key of this object is a regex for which
73
- * properties the schema applies to
74
- */
75
- patternProperties?: {
76
- [pattern: string]: JsonSchema4;
77
- };
78
- /**
79
- * If the key is present as a property then the
80
- * string of properties must also be present.
81
- * If the value is a JSON Schema then it must
82
- * also be valid for the object if the key is
83
- * present.
84
- */
85
- dependencies?: {
86
- [key: string]: JsonSchema4 | string[];
87
- };
88
- /**
89
- * Enumerates the values that this schema can be
90
- * e.g.
91
- * {"type": "string",
92
- * "enum": ["red", "green", "blue"]}
93
- */
94
- enum?: any[];
95
- /**
96
- * The basic type of this schema, can be one of
97
- * [string, number, object, array, boolean, null]
98
- * or an array of the acceptable types
99
- */
100
- type?: string | string[];
101
- allOf?: JsonSchema4[];
102
- anyOf?: JsonSchema4[];
103
- oneOf?: JsonSchema4[];
104
- /**
105
- * The entity being validated must not match this schema
106
- */
107
- not?: JsonSchema4;
108
- format?: string;
109
- const?: any;
110
- }
1
+ export interface JsonSchema4 {
2
+ $ref?: string;
3
+ /**
4
+ * This is important because it tells refs where
5
+ * the root of the document is located
6
+ */
7
+ id?: string;
8
+ /**
9
+ * It is recommended that the meta-schema is
10
+ * included in the root of any JSON Schema
11
+ */
12
+ $schema?: string;
13
+ /**
14
+ * Title of the schema
15
+ */
16
+ title?: string;
17
+ /**
18
+ * Schema description
19
+ */
20
+ description?: string;
21
+ /**
22
+ * Default json for the object represented by
23
+ * this schema
24
+ */
25
+ default?: any;
26
+ /**
27
+ * The value must be a multiple of the number
28
+ * (e.g. 10 is a multiple of 5)
29
+ */
30
+ multipleOf?: number;
31
+ maximum?: number;
32
+ /**
33
+ * If true maximum must be > value, >= otherwise
34
+ */
35
+ exclusiveMaximum?: boolean;
36
+ minimum?: number;
37
+ /**
38
+ * If true minimum must be < value, <= otherwise
39
+ */
40
+ exclusiveMinimum?: boolean;
41
+ maxLength?: number;
42
+ minLength?: number;
43
+ /**
44
+ * This is a regex string that the value must
45
+ * conform to
46
+ */
47
+ pattern?: string;
48
+ additionalItems?: boolean | JsonSchema4;
49
+ items?: JsonSchema4 | JsonSchema4[];
50
+ maxItems?: number;
51
+ minItems?: number;
52
+ uniqueItems?: boolean;
53
+ maxProperties?: number;
54
+ minProperties?: number;
55
+ required?: string[];
56
+ additionalProperties?: boolean | JsonSchema4;
57
+ /**
58
+ * Holds simple JSON Schema definitions for
59
+ * referencing from elsewhere.
60
+ */
61
+ definitions?: {
62
+ [key: string]: JsonSchema4;
63
+ };
64
+ /**
65
+ * The keys that can exist on the object with the
66
+ * json schema that should validate their value
67
+ */
68
+ properties?: {
69
+ [property: string]: JsonSchema4;
70
+ };
71
+ /**
72
+ * The key of this object is a regex for which
73
+ * properties the schema applies to
74
+ */
75
+ patternProperties?: {
76
+ [pattern: string]: JsonSchema4;
77
+ };
78
+ /**
79
+ * If the key is present as a property then the
80
+ * string of properties must also be present.
81
+ * If the value is a JSON Schema then it must
82
+ * also be valid for the object if the key is
83
+ * present.
84
+ */
85
+ dependencies?: {
86
+ [key: string]: JsonSchema4 | string[];
87
+ };
88
+ /**
89
+ * Enumerates the values that this schema can be
90
+ * e.g.
91
+ * {"type": "string",
92
+ * "enum": ["red", "green", "blue"]}
93
+ */
94
+ enum?: any[];
95
+ /**
96
+ * The basic type of this schema, can be one of
97
+ * [string, number, object, array, boolean, null]
98
+ * or an array of the acceptable types
99
+ */
100
+ type?: string | string[];
101
+ allOf?: JsonSchema4[];
102
+ anyOf?: JsonSchema4[];
103
+ oneOf?: JsonSchema4[];
104
+ /**
105
+ * The entity being validated must not match this schema
106
+ */
107
+ not?: JsonSchema4;
108
+ format?: string;
109
+ const?: any;
110
+ }