@hyperjump/json-schema 1.12.0 → 1.12.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.
- package/draft-04/additionalItems.js +3 -1
- package/draft-04/dependencies.js +3 -1
- package/draft-04/items.js +3 -1
- package/draft-06/index.d.ts +4 -2
- package/draft-2019-09/index.d.ts +2 -1
- package/draft-2020-12/dynamicRef.js +3 -1
- package/draft-2020-12/index.d.ts +2 -1
- package/package.json +1 -1
- package/stable/index.d.ts +2 -0
|
@@ -26,6 +26,8 @@ const interpret = ([numberOfItems, additionalItems], instance, context) => {
|
|
|
26
26
|
);
|
|
27
27
|
};
|
|
28
28
|
|
|
29
|
+
const simpleApplicator = true;
|
|
30
|
+
|
|
29
31
|
const collectEvaluatedItems = (keywordValue, instance, context) => {
|
|
30
32
|
if (!interpret(keywordValue, instance, context)) {
|
|
31
33
|
return false;
|
|
@@ -39,4 +41,4 @@ const collectEvaluatedItems = (keywordValue, instance, context) => {
|
|
|
39
41
|
return evaluatedIndexes;
|
|
40
42
|
};
|
|
41
43
|
|
|
42
|
-
export default { id, compile, interpret, collectEvaluatedItems };
|
|
44
|
+
export default { id, compile, interpret, simpleApplicator, collectEvaluatedItems };
|
package/draft-04/dependencies.js
CHANGED
package/draft-04/items.js
CHANGED
|
@@ -34,10 +34,12 @@ const interpret = (items, instance, context) => {
|
|
|
34
34
|
}
|
|
35
35
|
};
|
|
36
36
|
|
|
37
|
+
const simpleApplicator = true;
|
|
38
|
+
|
|
37
39
|
const collectEvaluatedItems = (items, instance, context) => {
|
|
38
40
|
return interpret(items, instance, context) && (typeof items === "string"
|
|
39
41
|
? collectSet(range(0, Instance.length(instance)))
|
|
40
42
|
: collectSet(range(0, items.length)));
|
|
41
43
|
};
|
|
42
44
|
|
|
43
|
-
export default { id, compile, interpret, collectEvaluatedItems };
|
|
45
|
+
export default { id, compile, interpret, simpleApplicator, collectEvaluatedItems };
|
package/draft-06/index.d.ts
CHANGED
|
@@ -2,9 +2,10 @@ import type { Json } from "@hyperjump/json-pointer";
|
|
|
2
2
|
import type { JsonSchemaType } from "../lib/common.js";
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
export type
|
|
5
|
+
export type JsonSchemaDraft06Ref = {
|
|
6
6
|
$ref: string;
|
|
7
|
-
}
|
|
7
|
+
};
|
|
8
|
+
export type JsonSchemaDraft06Object = {
|
|
8
9
|
$schema?: "http://json-schema.org/draft-06/schema#";
|
|
9
10
|
$id?: string;
|
|
10
11
|
title?: string;
|
|
@@ -43,5 +44,6 @@ export type JsonSchemaDraft06 = boolean | {
|
|
|
43
44
|
oneOf?: JsonSchemaDraft06[];
|
|
44
45
|
not?: JsonSchemaDraft06;
|
|
45
46
|
};
|
|
47
|
+
export type JsonSchemaDraft06 = boolean | JsonSchemaDraft06Ref | JsonSchemaDraft06Object;
|
|
46
48
|
|
|
47
49
|
export * from "../lib/index.js";
|
package/draft-2019-09/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import type { Json } from "@hyperjump/json-pointer";
|
|
|
2
2
|
import type { JsonSchemaType } from "../lib/common.js";
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
export type
|
|
5
|
+
export type JsonSchemaDraft201909Object = {
|
|
6
6
|
$schema?: "https://json-schema.org/draft/2019-09/schema";
|
|
7
7
|
$id?: string;
|
|
8
8
|
$anchor?: string;
|
|
@@ -61,5 +61,6 @@ export type JsonSchemaDraft201909 = boolean | {
|
|
|
61
61
|
contentEncoding?: string;
|
|
62
62
|
contentSchema?: JsonSchemaDraft201909;
|
|
63
63
|
};
|
|
64
|
+
export type JsonSchemaDraft201909 = boolean | JsonSchemaDraft201909Object;
|
|
64
65
|
|
|
65
66
|
export * from "../lib/index.js";
|
|
@@ -21,8 +21,10 @@ const evaluate = (strategy, [id, fragment, ref], instance, context) => {
|
|
|
21
21
|
}
|
|
22
22
|
};
|
|
23
23
|
|
|
24
|
+
const simpleApplicator = true;
|
|
25
|
+
|
|
24
26
|
const interpret = (...args) => evaluate(Validation.interpret, ...args);
|
|
25
27
|
const collectEvaluatedProperties = (...args) => evaluate(Validation.collectEvaluatedProperties, ...args);
|
|
26
28
|
const collectEvaluatedItems = (...args) => evaluate(Validation.collectEvaluatedItems, ...args);
|
|
27
29
|
|
|
28
|
-
export default { id, compile, interpret, collectEvaluatedProperties, collectEvaluatedItems };
|
|
30
|
+
export default { id, compile, interpret, simpleApplicator, collectEvaluatedProperties, collectEvaluatedItems };
|
package/draft-2020-12/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import type { Json } from "@hyperjump/json-pointer";
|
|
|
2
2
|
import type { JsonSchemaType } from "../lib/common.js";
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
export type
|
|
5
|
+
export type JsonSchemaDraft202012Object = {
|
|
6
6
|
$schema?: "https://json-schema.org/draft/2020-12/schema";
|
|
7
7
|
$id?: string;
|
|
8
8
|
$anchor?: string;
|
|
@@ -62,5 +62,6 @@ export type JsonSchemaDraft202012 = boolean | {
|
|
|
62
62
|
contentEncoding?: string;
|
|
63
63
|
contentSchema?: JsonSchemaDraft202012;
|
|
64
64
|
};
|
|
65
|
+
export type JsonSchemaDraft202012 = boolean | JsonSchemaDraft202012Object;
|
|
65
66
|
|
|
66
67
|
export * from "../lib/index.js";
|
package/package.json
CHANGED
package/stable/index.d.ts
CHANGED
|
@@ -2,6 +2,8 @@ import type { Json } from "@hyperjump/json-pointer";
|
|
|
2
2
|
import type { JsonSchemaType } from "../lib/common.js";
|
|
3
3
|
|
|
4
4
|
|
|
5
|
+
export type JsonSchemaType = JsonSchemaType;
|
|
6
|
+
|
|
5
7
|
export type JsonSchema = boolean | {
|
|
6
8
|
$schema?: "https://json-schema.org/validation";
|
|
7
9
|
$id?: string;
|