@hyperjump/json-schema 1.9.6 → 1.9.8
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-06/index.js +1 -0
- package/draft-07/index.js +3 -0
- package/lib/instance.d.ts +10 -10
- package/package.json +1 -1
package/draft-06/index.js
CHANGED
|
@@ -33,6 +33,7 @@ defineVocabulary(jsonSchemaVersion, {
|
|
|
33
33
|
"dependencies": "https://json-schema.org/keyword/draft-04/dependencies",
|
|
34
34
|
"description": "https://json-schema.org/keyword/description",
|
|
35
35
|
"enum": "https://json-schema.org/keyword/enum",
|
|
36
|
+
"examples": "https://json-schema.org/keyword/examples",
|
|
36
37
|
"exclusiveMaximum": "https://json-schema.org/keyword/exclusiveMaximum",
|
|
37
38
|
"exclusiveMinimum": "https://json-schema.org/keyword/exclusiveMinimum",
|
|
38
39
|
"format": "https://json-schema.org/keyword/format",
|
package/draft-07/index.js
CHANGED
|
@@ -29,11 +29,14 @@ defineVocabulary(jsonSchemaVersion, {
|
|
|
29
29
|
"anyOf": "https://json-schema.org/keyword/anyOf",
|
|
30
30
|
"const": "https://json-schema.org/keyword/const",
|
|
31
31
|
"contains": "https://json-schema.org/keyword/draft-06/contains",
|
|
32
|
+
"contentEncoding": "https://json-schema.org/keyword/contentEncoding",
|
|
33
|
+
"contentMediaType": "https://json-schema.org/keyword/contentMediaType",
|
|
32
34
|
"default": "https://json-schema.org/keyword/default",
|
|
33
35
|
"definitions": "https://json-schema.org/keyword/definitions",
|
|
34
36
|
"dependencies": "https://json-schema.org/keyword/draft-04/dependencies",
|
|
35
37
|
"description": "https://json-schema.org/keyword/description",
|
|
36
38
|
"enum": "https://json-schema.org/keyword/enum",
|
|
39
|
+
"examples": "https://json-schema.org/keyword/examples",
|
|
37
40
|
"exclusiveMaximum": "https://json-schema.org/keyword/exclusiveMaximum",
|
|
38
41
|
"exclusiveMinimum": "https://json-schema.org/keyword/exclusiveMinimum",
|
|
39
42
|
"format": "https://json-schema.org/keyword/format",
|
package/lib/instance.d.ts
CHANGED
|
@@ -6,24 +6,24 @@ export const fromJs: (value: Json, uri?: string) => JsonNode;
|
|
|
6
6
|
export const cons: (
|
|
7
7
|
baseUri: string,
|
|
8
8
|
pointer: string,
|
|
9
|
-
value: Json,
|
|
9
|
+
value: Json | undefined,
|
|
10
10
|
type: JsonNodeType,
|
|
11
11
|
children: JsonNode[],
|
|
12
12
|
parent?: JsonNode
|
|
13
13
|
) => JsonNode;
|
|
14
|
-
export const get: (url: string, context:
|
|
14
|
+
export const get: <T extends JsonNode>(url: string, context: T) => T | undefined;
|
|
15
15
|
export const uri: (node: JsonNode) => string;
|
|
16
16
|
export const value: <A>(node: JsonNode) => A;
|
|
17
17
|
export const has: (key: string, node: JsonNode) => boolean;
|
|
18
|
-
export const typeOf: (node: JsonNode) =>
|
|
19
|
-
export const step: (key: string, node:
|
|
20
|
-
export const iter: (node:
|
|
21
|
-
export const keys: (node:
|
|
22
|
-
export const values: (node:
|
|
23
|
-
export const entries: (node:
|
|
24
|
-
export const length: (node:
|
|
18
|
+
export const typeOf: (node: JsonNode) => JsonNodeType;
|
|
19
|
+
export const step: <T extends JsonNode>(key: string, node: T) => T | undefined;
|
|
20
|
+
export const iter: <T extends JsonNode>(node: T) => Generator<T>;
|
|
21
|
+
export const keys: <T extends JsonNode>(node: T) => Generator<T>;
|
|
22
|
+
export const values: <T extends JsonNode>(node: T) => Generator<T>;
|
|
23
|
+
export const entries: <T extends JsonNode>(node: T) => Generator<[T, T]>;
|
|
24
|
+
export const length: <T extends JsonNode>(node: T) => number;
|
|
25
25
|
|
|
26
|
-
export const allNodes: (node:
|
|
26
|
+
export const allNodes: <T extends JsonNode>(node: T) => Generator<T>;
|
|
27
27
|
|
|
28
28
|
export type JsonNode = {
|
|
29
29
|
baseUri: string;
|