@twin.org/data-core 0.0.1-next.8 → 0.0.1-next.9
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/dist/cjs/index.cjs +4 -0
- package/dist/esm/index.mjs +4 -0
- package/docs/changelog.md +1 -1
- package/package.json +1 -1
package/dist/cjs/index.cjs
CHANGED
|
@@ -77,6 +77,10 @@ class JsonSchemaHelper {
|
|
|
77
77
|
static async validate(schema, data, additionalTypes) {
|
|
78
78
|
const ajv = new Ajv({
|
|
79
79
|
allowUnionTypes: true,
|
|
80
|
+
// Disable strict tuples as it causes issues with the schema validation when
|
|
81
|
+
// you have an array with fixed elements e.g. myType: [string, ...string[]]
|
|
82
|
+
// https://github.com/ajv-validator/ajv/issues/1417
|
|
83
|
+
strictTuples: false,
|
|
80
84
|
loadSchema: async (uri) => {
|
|
81
85
|
const subTypeHandler = DataTypeHandlerFactory.getIfExists(uri);
|
|
82
86
|
if (core.Is.function(subTypeHandler?.jsonSchema)) {
|
package/dist/esm/index.mjs
CHANGED
|
@@ -75,6 +75,10 @@ class JsonSchemaHelper {
|
|
|
75
75
|
static async validate(schema, data, additionalTypes) {
|
|
76
76
|
const ajv = new Ajv({
|
|
77
77
|
allowUnionTypes: true,
|
|
78
|
+
// Disable strict tuples as it causes issues with the schema validation when
|
|
79
|
+
// you have an array with fixed elements e.g. myType: [string, ...string[]]
|
|
80
|
+
// https://github.com/ajv-validator/ajv/issues/1417
|
|
81
|
+
strictTuples: false,
|
|
78
82
|
loadSchema: async (uri) => {
|
|
79
83
|
const subTypeHandler = DataTypeHandlerFactory.getIfExists(uri);
|
|
80
84
|
if (Is.function(subTypeHandler?.jsonSchema)) {
|
package/docs/changelog.md
CHANGED