@twin.org/data-core 0.0.1-next.14 → 0.0.1-next.16
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.
package/docs/changelog.md
CHANGED
|
@@ -22,23 +22,33 @@ Validate a data type.
|
|
|
22
22
|
|
|
23
23
|
#### Parameters
|
|
24
24
|
|
|
25
|
-
|
|
25
|
+
##### propertyName
|
|
26
|
+
|
|
27
|
+
`string`
|
|
26
28
|
|
|
27
29
|
The name of the property being validated to use in error messages.
|
|
28
30
|
|
|
29
|
-
|
|
31
|
+
##### dataType
|
|
30
32
|
|
|
31
33
|
The data type to validate.
|
|
32
34
|
|
|
33
|
-
|
|
35
|
+
`undefined` | `string`
|
|
36
|
+
|
|
37
|
+
##### data
|
|
38
|
+
|
|
39
|
+
`unknown`
|
|
34
40
|
|
|
35
41
|
The data to validate.
|
|
36
42
|
|
|
37
|
-
|
|
43
|
+
##### validationFailures
|
|
44
|
+
|
|
45
|
+
`IValidationFailure`[]
|
|
38
46
|
|
|
39
47
|
The list of validation failures to add to.
|
|
40
48
|
|
|
41
|
-
|
|
49
|
+
##### validationMode?
|
|
50
|
+
|
|
51
|
+
[`ValidationMode`](../type-aliases/ValidationMode.md)
|
|
42
52
|
|
|
43
53
|
The validation mode to use, defaults to either.
|
|
44
54
|
|
|
@@ -34,15 +34,19 @@ Validates data against the schema.
|
|
|
34
34
|
|
|
35
35
|
#### Parameters
|
|
36
36
|
|
|
37
|
-
|
|
37
|
+
##### schema
|
|
38
|
+
|
|
39
|
+
`JSONSchema7`
|
|
38
40
|
|
|
39
41
|
The schema to validate the data with.
|
|
40
42
|
|
|
41
|
-
|
|
43
|
+
##### data
|
|
44
|
+
|
|
45
|
+
`T`
|
|
42
46
|
|
|
43
47
|
The data to be validated.
|
|
44
48
|
|
|
45
|
-
|
|
49
|
+
##### additionalTypes?
|
|
46
50
|
|
|
47
51
|
Additional types to add for reference, not already in DataTypeHandlerFactory.
|
|
48
52
|
|
|
@@ -62,11 +66,15 @@ Get the property type from a schema.
|
|
|
62
66
|
|
|
63
67
|
#### Parameters
|
|
64
68
|
|
|
65
|
-
|
|
69
|
+
##### schema
|
|
70
|
+
|
|
71
|
+
`JSONSchema7`
|
|
66
72
|
|
|
67
73
|
The schema to extract the types from.
|
|
68
74
|
|
|
69
|
-
|
|
75
|
+
##### propertyName
|
|
76
|
+
|
|
77
|
+
`string`
|
|
70
78
|
|
|
71
79
|
The name of the property to get the type for.
|
|
72
80
|
|
|
@@ -86,11 +94,15 @@ Convert an entity schema to JSON schema e.g https://example.com/schemas/.
|
|
|
86
94
|
|
|
87
95
|
#### Parameters
|
|
88
96
|
|
|
89
|
-
|
|
97
|
+
##### entitySchema
|
|
90
98
|
|
|
91
99
|
The entity schema to convert.
|
|
92
100
|
|
|
93
|
-
|
|
101
|
+
`undefined` | `IEntitySchema`
|
|
102
|
+
|
|
103
|
+
##### baseDomain?
|
|
104
|
+
|
|
105
|
+
`string`
|
|
94
106
|
|
|
95
107
|
The base domain for local schemas e.g. https://example.com/
|
|
96
108
|
|
|
@@ -42,19 +42,27 @@ A method for validating the data type.
|
|
|
42
42
|
|
|
43
43
|
#### Parameters
|
|
44
44
|
|
|
45
|
-
|
|
45
|
+
##### propertyName
|
|
46
|
+
|
|
47
|
+
`string`
|
|
46
48
|
|
|
47
49
|
The name of the property being validated.
|
|
48
50
|
|
|
49
|
-
|
|
51
|
+
##### value
|
|
52
|
+
|
|
53
|
+
`unknown`
|
|
50
54
|
|
|
51
55
|
The value to validate.
|
|
52
56
|
|
|
53
|
-
|
|
57
|
+
##### failures
|
|
58
|
+
|
|
59
|
+
`IValidationFailure`[]
|
|
54
60
|
|
|
55
61
|
List of failures to add to.
|
|
56
62
|
|
|
57
|
-
|
|
63
|
+
##### container?
|
|
64
|
+
|
|
65
|
+
`unknown`
|
|
58
66
|
|
|
59
67
|
The object which contains this one.
|
|
60
68
|
|
|
@@ -20,15 +20,21 @@ A method for validating the identifier.
|
|
|
20
20
|
|
|
21
21
|
#### Parameters
|
|
22
22
|
|
|
23
|
-
|
|
23
|
+
##### propertyName
|
|
24
|
+
|
|
25
|
+
`string`
|
|
24
26
|
|
|
25
27
|
The name of the property being validated.
|
|
26
28
|
|
|
27
|
-
|
|
29
|
+
##### value
|
|
30
|
+
|
|
31
|
+
`unknown`
|
|
28
32
|
|
|
29
33
|
The value to validate.
|
|
30
34
|
|
|
31
|
-
|
|
35
|
+
##### failures
|
|
36
|
+
|
|
37
|
+
`IValidationFailure`[]
|
|
32
38
|
|
|
33
39
|
List of failures to add to.
|
|
34
40
|
|