@speclynx/apidom-ns-json-schema-draft-6 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/CHANGELOG.md +82 -0
- package/LICENSE +202 -0
- package/LICENSES/AFL-3.0.txt +182 -0
- package/LICENSES/Apache-2.0.txt +202 -0
- package/LICENSES/BSD-3-Clause.txt +26 -0
- package/LICENSES/MIT.txt +9 -0
- package/NOTICE +65 -0
- package/README.md +189 -0
- package/dist/apidom-ns-json-schema-draft-6.browser.js +1 -0
- package/package.json +65 -0
- package/src/elements/JSONSchema.cjs +116 -0
- package/src/elements/JSONSchema.mjs +113 -0
- package/src/elements/LinkDescription.cjs +56 -0
- package/src/elements/LinkDescription.mjs +52 -0
- package/src/index.cjs +58 -0
- package/src/index.mjs +17 -0
- package/src/media-types.cjs +34 -0
- package/src/media-types.mjs +30 -0
- package/src/namespace.cjs +24 -0
- package/src/namespace.mjs +19 -0
- package/src/predicates.cjs +32 -0
- package/src/predicates.mjs +26 -0
- package/src/refractor/index.cjs +53 -0
- package/src/refractor/index.mjs +47 -0
- package/src/refractor/plugins/replace-empty-element.cjs +214 -0
- package/src/refractor/plugins/replace-empty-element.mjs +207 -0
- package/src/refractor/registration.cjs +13 -0
- package/src/refractor/registration.mjs +6 -0
- package/src/refractor/specification.cjs +17 -0
- package/src/refractor/specification.mjs +12 -0
- package/src/refractor/toolbox.cjs +21 -0
- package/src/refractor/toolbox.mjs +15 -0
- package/src/refractor/visitors/json-schema/ExamplesVisitor.cjs +16 -0
- package/src/refractor/visitors/json-schema/ExamplesVisitor.mjs +12 -0
- package/src/refractor/visitors/json-schema/ItemsVisitor.cjs +16 -0
- package/src/refractor/visitors/json-schema/ItemsVisitor.mjs +12 -0
- package/src/refractor/visitors/json-schema/index.cjs +28 -0
- package/src/refractor/visitors/json-schema/index.mjs +23 -0
- package/src/refractor/visitors/json-schema/link-description/index.cjs +17 -0
- package/src/refractor/visitors/json-schema/link-description/index.mjs +12 -0
- package/src/traversal/visitor.cjs +17 -0
- package/src/traversal/visitor.mjs +13 -0
- package/types/apidom-ns-json-schema-draft-6.d.ts +517 -0
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { BREAK } from '@speclynx/apidom-core';
|
|
2
|
+
import { ItemsVisitor as JSONSchemaDraft4ItemsVisitor } from '@speclynx/apidom-ns-json-schema-draft-4';
|
|
3
|
+
/**
|
|
4
|
+
* @public
|
|
5
|
+
*/
|
|
6
|
+
class ItemsVisitor extends JSONSchemaDraft4ItemsVisitor {
|
|
7
|
+
BooleanElement(booleanElement) {
|
|
8
|
+
this.element = this.toRefractedElement(['document', 'objects', 'JSONSchema'], booleanElement);
|
|
9
|
+
return BREAK;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
export default ItemsVisitor;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault").default;
|
|
4
|
+
exports.__esModule = true;
|
|
5
|
+
exports.default = void 0;
|
|
6
|
+
var _apidomNsJsonSchemaDraft = require("@speclynx/apidom-ns-json-schema-draft-4");
|
|
7
|
+
var _JSONSchema = _interopRequireDefault(require("../../../elements/JSONSchema.cjs"));
|
|
8
|
+
/**
|
|
9
|
+
* @public
|
|
10
|
+
*/
|
|
11
|
+
class JSONSchemaVisitor extends _apidomNsJsonSchemaDraft.JSONSchemaVisitor {
|
|
12
|
+
constructor(options) {
|
|
13
|
+
super(options);
|
|
14
|
+
this.element = new _JSONSchema.default();
|
|
15
|
+
}
|
|
16
|
+
get defaultDialectIdentifier() {
|
|
17
|
+
return 'http://json-schema.org/draft-06/schema#';
|
|
18
|
+
}
|
|
19
|
+
BooleanElement(booleanElement) {
|
|
20
|
+
const result = this.enter(booleanElement);
|
|
21
|
+
this.element.classes.push('boolean-json-schema');
|
|
22
|
+
return result;
|
|
23
|
+
}
|
|
24
|
+
handleSchemaIdentifier(objectElement, identifierKeyword = '$id') {
|
|
25
|
+
return super.handleSchemaIdentifier(objectElement, identifierKeyword);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
var _default = exports.default = JSONSchemaVisitor;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { JSONSchemaVisitor as JSONSchemaDraft4Visitor } from '@speclynx/apidom-ns-json-schema-draft-4';
|
|
2
|
+
import JSONSchemaElement from "../../../elements/JSONSchema.mjs";
|
|
3
|
+
/**
|
|
4
|
+
* @public
|
|
5
|
+
*/
|
|
6
|
+
class JSONSchemaVisitor extends JSONSchemaDraft4Visitor {
|
|
7
|
+
constructor(options) {
|
|
8
|
+
super(options);
|
|
9
|
+
this.element = new JSONSchemaElement();
|
|
10
|
+
}
|
|
11
|
+
get defaultDialectIdentifier() {
|
|
12
|
+
return 'http://json-schema.org/draft-06/schema#';
|
|
13
|
+
}
|
|
14
|
+
BooleanElement(booleanElement) {
|
|
15
|
+
const result = this.enter(booleanElement);
|
|
16
|
+
this.element.classes.push('boolean-json-schema');
|
|
17
|
+
return result;
|
|
18
|
+
}
|
|
19
|
+
handleSchemaIdentifier(objectElement, identifierKeyword = '$id') {
|
|
20
|
+
return super.handleSchemaIdentifier(objectElement, identifierKeyword);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
export default JSONSchemaVisitor;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault").default;
|
|
4
|
+
exports.__esModule = true;
|
|
5
|
+
exports.default = void 0;
|
|
6
|
+
var _apidomNsJsonSchemaDraft = require("@speclynx/apidom-ns-json-schema-draft-4");
|
|
7
|
+
var _LinkDescription = _interopRequireDefault(require("../../../../elements/LinkDescription.cjs"));
|
|
8
|
+
/**
|
|
9
|
+
* @public
|
|
10
|
+
*/
|
|
11
|
+
class LinkDescriptionVisitor extends _apidomNsJsonSchemaDraft.LinkDescriptionVisitor {
|
|
12
|
+
constructor(options) {
|
|
13
|
+
super(options);
|
|
14
|
+
this.element = new _LinkDescription.default();
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
var _default = exports.default = LinkDescriptionVisitor;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { LinkDescriptionVisitor as JSONSchemaDraft4LinkDescriptionVisitor } from '@speclynx/apidom-ns-json-schema-draft-4';
|
|
2
|
+
import LinkDescriptionElement from "../../../../elements/LinkDescription.mjs";
|
|
3
|
+
/**
|
|
4
|
+
* @public
|
|
5
|
+
*/
|
|
6
|
+
class LinkDescriptionVisitor extends JSONSchemaDraft4LinkDescriptionVisitor {
|
|
7
|
+
constructor(options) {
|
|
8
|
+
super(options);
|
|
9
|
+
this.element = new LinkDescriptionElement();
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
export default LinkDescriptionVisitor;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.keyMap = exports.getNodeType = void 0;
|
|
5
|
+
var _apidomCore = require("@speclynx/apidom-core");
|
|
6
|
+
var _apidomNsJsonSchemaDraft = require("@speclynx/apidom-ns-json-schema-draft-4");
|
|
7
|
+
exports.getNodeType = _apidomNsJsonSchemaDraft.getNodeType;
|
|
8
|
+
/**
|
|
9
|
+
* @public
|
|
10
|
+
*/
|
|
11
|
+
const keyMap = exports.keyMap = {
|
|
12
|
+
JSONSchemaDraft6Element: ['content'],
|
|
13
|
+
JSONReferenceElement: ['content'],
|
|
14
|
+
MediaElement: ['content'],
|
|
15
|
+
LinkDescriptionElement: ['content'],
|
|
16
|
+
..._apidomCore.keyMap
|
|
17
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { keyMap as keyMapBase } from '@speclynx/apidom-core';
|
|
2
|
+
export { getNodeType } from '@speclynx/apidom-ns-json-schema-draft-4';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* @public
|
|
6
|
+
*/
|
|
7
|
+
export const keyMap = {
|
|
8
|
+
JSONSchemaDraft6Element: ['content'],
|
|
9
|
+
JSONReferenceElement: ['content'],
|
|
10
|
+
MediaElement: ['content'],
|
|
11
|
+
LinkDescriptionElement: ['content'],
|
|
12
|
+
...keyMapBase
|
|
13
|
+
};
|
|
@@ -0,0 +1,517 @@
|
|
|
1
|
+
import { AllOfVisitor } from '@speclynx/apidom-ns-json-schema-draft-4';
|
|
2
|
+
import { AllOfVisitorOptions } from '@speclynx/apidom-ns-json-schema-draft-4';
|
|
3
|
+
import { AlternatingVisitor } from '@speclynx/apidom-ns-json-schema-draft-4';
|
|
4
|
+
import { AlternatingVisitorOptions } from '@speclynx/apidom-ns-json-schema-draft-4';
|
|
5
|
+
import { AnyOfVisitor } from '@speclynx/apidom-ns-json-schema-draft-4';
|
|
6
|
+
import { AnyOfVisitorOptions } from '@speclynx/apidom-ns-json-schema-draft-4';
|
|
7
|
+
import { ArrayElement } from '@speclynx/apidom-core';
|
|
8
|
+
import { Attributes } from '@speclynx/apidom-core';
|
|
9
|
+
import { BooleanElement } from '@speclynx/apidom-core';
|
|
10
|
+
import { DefinitionsVisitor } from '@speclynx/apidom-ns-json-schema-draft-4';
|
|
11
|
+
import { DefinitionsVisitorOptions } from '@speclynx/apidom-ns-json-schema-draft-4';
|
|
12
|
+
import { DependenciesVisitor } from '@speclynx/apidom-ns-json-schema-draft-4';
|
|
13
|
+
import { DependenciesVisitorOptions } from '@speclynx/apidom-ns-json-schema-draft-4';
|
|
14
|
+
import { Element as Element_2 } from '@speclynx/apidom-core';
|
|
15
|
+
import { ElementPredicate } from '@speclynx/apidom-core';
|
|
16
|
+
import { EnumVisitor } from '@speclynx/apidom-ns-json-schema-draft-4';
|
|
17
|
+
import { FallbackVisitor } from '@speclynx/apidom-ns-json-schema-draft-4';
|
|
18
|
+
import { FallbackVisitorOptions } from '@speclynx/apidom-ns-json-schema-draft-4';
|
|
19
|
+
import { FixedFieldsVisitor } from '@speclynx/apidom-ns-json-schema-draft-4';
|
|
20
|
+
import { FixedFieldsVisitorOptions } from '@speclynx/apidom-ns-json-schema-draft-4';
|
|
21
|
+
import { getNodeType } from '@speclynx/apidom-ns-json-schema-draft-4';
|
|
22
|
+
import { isArrayElement } from '@speclynx/apidom-core';
|
|
23
|
+
import { isBooleanElement } from '@speclynx/apidom-core';
|
|
24
|
+
import { isElement } from '@speclynx/apidom-core';
|
|
25
|
+
import { isJSONReferenceElement } from '@speclynx/apidom-ns-json-schema-draft-4';
|
|
26
|
+
import { isJSONReferenceLikeElement } from '@speclynx/apidom-ns-json-schema-draft-4';
|
|
27
|
+
import { isLinkElement } from '@speclynx/apidom-core';
|
|
28
|
+
import { isMediaElement } from '@speclynx/apidom-ns-json-schema-draft-4';
|
|
29
|
+
import { isMemberElement } from '@speclynx/apidom-core';
|
|
30
|
+
import { isNullElement } from '@speclynx/apidom-core';
|
|
31
|
+
import { isNumberElement } from '@speclynx/apidom-core';
|
|
32
|
+
import { isObjectElement } from '@speclynx/apidom-core';
|
|
33
|
+
import { isRefElement } from '@speclynx/apidom-core';
|
|
34
|
+
import { isStringElement } from '@speclynx/apidom-core';
|
|
35
|
+
import { ItemsVisitorOptions } from '@speclynx/apidom-ns-json-schema-draft-4';
|
|
36
|
+
import { JSONReference$RefVisitor } from '@speclynx/apidom-ns-json-schema-draft-4';
|
|
37
|
+
import { JSONReferenceElement } from '@speclynx/apidom-ns-json-schema-draft-4';
|
|
38
|
+
import { JSONReferenceVisitor } from '@speclynx/apidom-ns-json-schema-draft-4';
|
|
39
|
+
import { ItemsVisitor as JSONSchemaDraft4ItemsVisitor } from '@speclynx/apidom-ns-json-schema-draft-4';
|
|
40
|
+
import { JSONSchemaElement as JSONSchemaElement_2 } from '@speclynx/apidom-ns-json-schema-draft-4';
|
|
41
|
+
import { JSONSchemaVisitor as JSONSchemaVisitor_2 } from '@speclynx/apidom-ns-json-schema-draft-4';
|
|
42
|
+
import { JSONSchemaVisitorOptions } from '@speclynx/apidom-ns-json-schema-draft-4';
|
|
43
|
+
import { LinkDescriptionElement as LinkDescriptionElement_2 } from '@speclynx/apidom-ns-json-schema-draft-4';
|
|
44
|
+
import { LinkDescriptionVisitor as LinkDescriptionVisitor_2 } from '@speclynx/apidom-ns-json-schema-draft-4';
|
|
45
|
+
import { LinkDescriptionVisitorOptions } from '@speclynx/apidom-ns-json-schema-draft-4';
|
|
46
|
+
import { LinksVisitor } from '@speclynx/apidom-ns-json-schema-draft-4';
|
|
47
|
+
import { MapVisitor } from '@speclynx/apidom-ns-json-schema-draft-4';
|
|
48
|
+
import { MapVisitorOptions } from '@speclynx/apidom-ns-json-schema-draft-4';
|
|
49
|
+
import { MediaElement } from '@speclynx/apidom-ns-json-schema-draft-4';
|
|
50
|
+
import { MediaTypes } from '@speclynx/apidom-core';
|
|
51
|
+
import { MediaVisitor } from '@speclynx/apidom-ns-json-schema-draft-4';
|
|
52
|
+
import { Meta } from '@speclynx/apidom-core';
|
|
53
|
+
import { Namespace } from 'minim';
|
|
54
|
+
import { NamespacePluginOptions } from '@speclynx/apidom-core';
|
|
55
|
+
import { NumberElement } from '@speclynx/apidom-core';
|
|
56
|
+
import { ObjectElement } from '@speclynx/apidom-core';
|
|
57
|
+
import { OneOfVisitor } from '@speclynx/apidom-ns-json-schema-draft-4';
|
|
58
|
+
import { OneOfVisitorOptions } from '@speclynx/apidom-ns-json-schema-draft-4';
|
|
59
|
+
import { ParentSchemaAwareVisitor } from '@speclynx/apidom-ns-json-schema-draft-4';
|
|
60
|
+
import { ParentSchemaAwareVisitorOptions } from '@speclynx/apidom-ns-json-schema-draft-4';
|
|
61
|
+
import { PatternedFieldsVisitor } from '@speclynx/apidom-ns-json-schema-draft-4';
|
|
62
|
+
import { PatternedFieldsVisitorOptions } from '@speclynx/apidom-ns-json-schema-draft-4';
|
|
63
|
+
import { PatternPropertiesVisitor } from '@speclynx/apidom-ns-json-schema-draft-4';
|
|
64
|
+
import { PatternPropertiesVisitorOptions } from '@speclynx/apidom-ns-json-schema-draft-4';
|
|
65
|
+
import { PropertiesVisitor } from '@speclynx/apidom-ns-json-schema-draft-4';
|
|
66
|
+
import { PropertiesVisitorOptions } from '@speclynx/apidom-ns-json-schema-draft-4';
|
|
67
|
+
import { RequiredVisitor } from '@speclynx/apidom-ns-json-schema-draft-4';
|
|
68
|
+
import { SchemaOrReferenceVisitor } from '@speclynx/apidom-ns-json-schema-draft-4';
|
|
69
|
+
import { SchemaOrReferenceVisitorOptions } from '@speclynx/apidom-ns-json-schema-draft-4';
|
|
70
|
+
import { specificationObj as specificationObj_2 } from '@speclynx/apidom-ns-json-schema-draft-4';
|
|
71
|
+
import { SpecificationVisitor } from '@speclynx/apidom-ns-json-schema-draft-4';
|
|
72
|
+
import { SpecificationVisitorOptions } from '@speclynx/apidom-ns-json-schema-draft-4';
|
|
73
|
+
import { SpecPath } from '@speclynx/apidom-ns-json-schema-draft-4';
|
|
74
|
+
import { StringElement } from '@speclynx/apidom-core';
|
|
75
|
+
import { TypeVisitor } from '@speclynx/apidom-ns-json-schema-draft-4';
|
|
76
|
+
import { Visitor } from '@speclynx/apidom-ns-json-schema-draft-4';
|
|
77
|
+
import { VisitorOptions } from '@speclynx/apidom-ns-json-schema-draft-4';
|
|
78
|
+
|
|
79
|
+
export { AllOfVisitor }
|
|
80
|
+
|
|
81
|
+
export { AllOfVisitorOptions }
|
|
82
|
+
|
|
83
|
+
export { AlternatingVisitor }
|
|
84
|
+
|
|
85
|
+
export { AlternatingVisitorOptions }
|
|
86
|
+
|
|
87
|
+
export { AnyOfVisitor }
|
|
88
|
+
|
|
89
|
+
export { AnyOfVisitorOptions }
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* @public
|
|
93
|
+
*/
|
|
94
|
+
export declare const createRefractor: (specPath: string[]) => (value: unknown, options?: {}) => Element_2;
|
|
95
|
+
|
|
96
|
+
export { DefinitionsVisitor }
|
|
97
|
+
|
|
98
|
+
export { DefinitionsVisitorOptions }
|
|
99
|
+
|
|
100
|
+
export { DependenciesVisitor }
|
|
101
|
+
|
|
102
|
+
export { DependenciesVisitorOptions }
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* @public
|
|
106
|
+
*/
|
|
107
|
+
export declare class ExamplesVisitor extends FallbackVisitor {
|
|
108
|
+
readonly element: ArrayElement;
|
|
109
|
+
ArrayElement(arrayElement: ArrayElement): {};
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
export { FallbackVisitor }
|
|
113
|
+
|
|
114
|
+
export { FallbackVisitorOptions as ExamplesVisitorOptions }
|
|
115
|
+
export { FallbackVisitorOptions }
|
|
116
|
+
|
|
117
|
+
export { FixedFieldsVisitor }
|
|
118
|
+
|
|
119
|
+
export { FixedFieldsVisitorOptions }
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* @public
|
|
123
|
+
*/
|
|
124
|
+
export declare type Format = 'generic' | 'json' | 'yaml';
|
|
125
|
+
|
|
126
|
+
export { getNodeType }
|
|
127
|
+
|
|
128
|
+
export { isArrayElement }
|
|
129
|
+
|
|
130
|
+
export { isBooleanElement }
|
|
131
|
+
|
|
132
|
+
export { isElement }
|
|
133
|
+
|
|
134
|
+
export { isJSONReferenceElement }
|
|
135
|
+
|
|
136
|
+
export { isJSONReferenceLikeElement }
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* @public
|
|
140
|
+
*/
|
|
141
|
+
export declare const isJSONSchemaElement: ElementPredicate<JSONSchemaElement>;
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* @public
|
|
145
|
+
*/
|
|
146
|
+
export declare const isLinkDescriptionElement: ElementPredicate<LinkDescriptionElement>;
|
|
147
|
+
|
|
148
|
+
export { isLinkElement }
|
|
149
|
+
|
|
150
|
+
export { isMediaElement }
|
|
151
|
+
|
|
152
|
+
export { isMemberElement }
|
|
153
|
+
|
|
154
|
+
export { isNullElement }
|
|
155
|
+
|
|
156
|
+
export { isNumberElement }
|
|
157
|
+
|
|
158
|
+
export { isObjectElement }
|
|
159
|
+
|
|
160
|
+
export { isRefElement }
|
|
161
|
+
|
|
162
|
+
export { isStringElement }
|
|
163
|
+
|
|
164
|
+
/**
|
|
165
|
+
* @public
|
|
166
|
+
*/
|
|
167
|
+
export declare class ItemsVisitor extends JSONSchemaDraft4ItemsVisitor {
|
|
168
|
+
BooleanElement(booleanElement: BooleanElement): {};
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
export { ItemsVisitorOptions }
|
|
172
|
+
|
|
173
|
+
export { JSONReferenceElement }
|
|
174
|
+
|
|
175
|
+
export { JSONSchemaDraft4ItemsVisitor }
|
|
176
|
+
|
|
177
|
+
/**
|
|
178
|
+
* @public
|
|
179
|
+
*/
|
|
180
|
+
declare const jsonSchemaDraft6: {
|
|
181
|
+
namespace: (options: NamespacePluginOptions) => Namespace;
|
|
182
|
+
};
|
|
183
|
+
export default jsonSchemaDraft6;
|
|
184
|
+
|
|
185
|
+
/**
|
|
186
|
+
* @public
|
|
187
|
+
*/
|
|
188
|
+
export declare class JSONSchemaDraft6MediaTypes extends MediaTypes<string> {
|
|
189
|
+
filterByFormat(format?: Format): string[];
|
|
190
|
+
findBy(version?: string, format?: Format): string;
|
|
191
|
+
latest(format?: Format): string;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
/**
|
|
195
|
+
* @public
|
|
196
|
+
*/
|
|
197
|
+
export declare class JSONSchemaElement extends JSONSchemaElement_2 {
|
|
198
|
+
constructor(content?: Record<string, unknown>, meta?: Meta, attributes?: Attributes);
|
|
199
|
+
/**
|
|
200
|
+
* Core vocabulary
|
|
201
|
+
*
|
|
202
|
+
* URI: https://datatracker.ietf.org/doc/html/draft-wright-json-schema-01
|
|
203
|
+
*/
|
|
204
|
+
get idProp(): StringElement | undefined;
|
|
205
|
+
set idProp(id: StringElement | undefined);
|
|
206
|
+
get $id(): StringElement | undefined;
|
|
207
|
+
set $id($id: StringElement | undefined);
|
|
208
|
+
/**
|
|
209
|
+
* Validation vocabulary
|
|
210
|
+
*
|
|
211
|
+
* URI: https://datatracker.ietf.org/doc/html/draft-wright-json-schema-validation-01
|
|
212
|
+
*/
|
|
213
|
+
/**
|
|
214
|
+
* Validation keywords for numeric instances (number and integer)
|
|
215
|
+
*/
|
|
216
|
+
get exclusiveMaximum(): NumberElement | undefined;
|
|
217
|
+
set exclusiveMaximum(exclusiveMaximum: NumberElement | undefined);
|
|
218
|
+
get exclusiveMinimum(): NumberElement | undefined;
|
|
219
|
+
set exclusiveMinimum(exclusiveMinimum: NumberElement | undefined);
|
|
220
|
+
/**
|
|
221
|
+
* Validation keywords for arrays
|
|
222
|
+
*/
|
|
223
|
+
get containsProp(): this | BooleanElement | JSONReferenceElement | undefined;
|
|
224
|
+
set containsProp(contains: this | BooleanElement | JSONReferenceElement | undefined);
|
|
225
|
+
get items(): this | BooleanElement | JSONReferenceElement | ArrayElement | undefined | any;
|
|
226
|
+
set items(items: this | BooleanElement | JSONReferenceElement | ArrayElement | undefined | any);
|
|
227
|
+
/**
|
|
228
|
+
* Validation keywords for objects
|
|
229
|
+
*/
|
|
230
|
+
get propertyNames(): this | BooleanElement | JSONReferenceElement | undefined;
|
|
231
|
+
set propertyNames(propertyNames: this | BooleanElement | JSONReferenceElement | undefined);
|
|
232
|
+
/**
|
|
233
|
+
* Validation keywords for any instance type
|
|
234
|
+
*/
|
|
235
|
+
get const(): Element_2 | undefined;
|
|
236
|
+
set const(constValue: Element_2 | undefined);
|
|
237
|
+
get not(): this | BooleanElement | JSONReferenceElement | undefined | any;
|
|
238
|
+
set not(not: this | BooleanElement | JSONReferenceElement | undefined | any);
|
|
239
|
+
/**
|
|
240
|
+
* Metadata keywords
|
|
241
|
+
*
|
|
242
|
+
* URI: https://datatracker.ietf.org/doc/html/draft-wright-json-schema-validation-01#section-7
|
|
243
|
+
*/
|
|
244
|
+
get examples(): ArrayElement | undefined;
|
|
245
|
+
set examples(examples: ArrayElement | undefined);
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
/**
|
|
249
|
+
* @public
|
|
250
|
+
*/
|
|
251
|
+
export declare class JSONSchemaVisitor extends JSONSchemaVisitor_2 {
|
|
252
|
+
element: JSONSchemaElement;
|
|
253
|
+
constructor(options: JSONSchemaVisitorOptions);
|
|
254
|
+
get defaultDialectIdentifier(): string;
|
|
255
|
+
BooleanElement(booleanElement: BooleanElement): {};
|
|
256
|
+
handleSchemaIdentifier(objectElement: ObjectElement, identifierKeyword?: string): void;
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
export { JSONSchemaVisitorOptions }
|
|
260
|
+
|
|
261
|
+
/**
|
|
262
|
+
* @public
|
|
263
|
+
*/
|
|
264
|
+
export declare const keyMap: {
|
|
265
|
+
ObjectElement: string[];
|
|
266
|
+
ArrayElement: string[];
|
|
267
|
+
MemberElement: string[];
|
|
268
|
+
StringElement: never[];
|
|
269
|
+
BooleanElement: never[];
|
|
270
|
+
NumberElement: never[];
|
|
271
|
+
NullElement: never[];
|
|
272
|
+
RefElement: never[];
|
|
273
|
+
LinkElement: never[];
|
|
274
|
+
Annotation: never[];
|
|
275
|
+
Comment: never[];
|
|
276
|
+
ParseResultElement: string[];
|
|
277
|
+
SourceMap: string[];
|
|
278
|
+
JSONSchemaDraft6Element: string[];
|
|
279
|
+
JSONReferenceElement: string[];
|
|
280
|
+
MediaElement: string[];
|
|
281
|
+
LinkDescriptionElement: string[];
|
|
282
|
+
};
|
|
283
|
+
|
|
284
|
+
/**
|
|
285
|
+
* URI: https://datatracker.ietf.org/doc/html/draft-wright-json-schema-hyperschema-01#section-6
|
|
286
|
+
* @public
|
|
287
|
+
*/
|
|
288
|
+
export declare class LinkDescriptionElement extends LinkDescriptionElement_2 {
|
|
289
|
+
get hrefSchema(): JSONSchemaElement | BooleanElement | JSONReferenceElement | undefined;
|
|
290
|
+
set hrefSchema(hrefSchema: JSONSchemaElement | BooleanElement | JSONReferenceElement | undefined);
|
|
291
|
+
get targetSchema(): JSONSchemaElement | BooleanElement | JSONReferenceElement | undefined | any;
|
|
292
|
+
set targetSchema(targetSchema: JSONSchemaElement | BooleanElement | JSONReferenceElement | undefined | any);
|
|
293
|
+
get schema(): JSONSchemaElement | JSONReferenceElement | undefined;
|
|
294
|
+
set schema(schema: JSONSchemaElement | JSONReferenceElement | undefined);
|
|
295
|
+
get submissionSchema(): JSONSchemaElement | BooleanElement | JSONReferenceElement | undefined;
|
|
296
|
+
set submissionSchema(submissionSchema: JSONSchemaElement | BooleanElement | JSONReferenceElement | undefined);
|
|
297
|
+
get method(): StringElement | undefined;
|
|
298
|
+
set method(method: StringElement | undefined);
|
|
299
|
+
get encType(): StringElement | undefined;
|
|
300
|
+
set encType(encType: StringElement | undefined);
|
|
301
|
+
get submissionEncType(): StringElement | undefined;
|
|
302
|
+
set submissionEncType(submissionEncType: StringElement | undefined);
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
/**
|
|
306
|
+
* @public
|
|
307
|
+
*/
|
|
308
|
+
export declare class LinkDescriptionVisitor extends LinkDescriptionVisitor_2 {
|
|
309
|
+
readonly element: LinkDescriptionElement;
|
|
310
|
+
constructor(options: LinkDescriptionVisitorOptions);
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
export { LinkDescriptionVisitorOptions }
|
|
314
|
+
|
|
315
|
+
export { MapVisitor }
|
|
316
|
+
|
|
317
|
+
export { MapVisitorOptions }
|
|
318
|
+
|
|
319
|
+
export { MediaElement }
|
|
320
|
+
|
|
321
|
+
/**
|
|
322
|
+
* @public
|
|
323
|
+
*/
|
|
324
|
+
export declare const mediaTypes: JSONSchemaDraft6MediaTypes;
|
|
325
|
+
|
|
326
|
+
export { OneOfVisitor }
|
|
327
|
+
|
|
328
|
+
export { OneOfVisitorOptions }
|
|
329
|
+
|
|
330
|
+
export { ParentSchemaAwareVisitor }
|
|
331
|
+
|
|
332
|
+
export { ParentSchemaAwareVisitorOptions }
|
|
333
|
+
|
|
334
|
+
export { PatternedFieldsVisitor }
|
|
335
|
+
|
|
336
|
+
export { PatternedFieldsVisitorOptions }
|
|
337
|
+
|
|
338
|
+
export { PatternPropertiesVisitor }
|
|
339
|
+
|
|
340
|
+
export { PatternPropertiesVisitorOptions }
|
|
341
|
+
|
|
342
|
+
export { PropertiesVisitor }
|
|
343
|
+
|
|
344
|
+
export { PropertiesVisitorOptions }
|
|
345
|
+
|
|
346
|
+
/**
|
|
347
|
+
* @public
|
|
348
|
+
*/
|
|
349
|
+
export declare const refract: <T extends Element_2>(value: unknown, { specPath, plugins, specificationObj, }?: {
|
|
350
|
+
specPath?: string[] | undefined;
|
|
351
|
+
plugins?: never[] | undefined;
|
|
352
|
+
specificationObj?: {
|
|
353
|
+
visitors: {
|
|
354
|
+
value: FallbackVisitor;
|
|
355
|
+
JSONSchemaOrJSONReferenceVisitor: SchemaOrReferenceVisitor;
|
|
356
|
+
document: {
|
|
357
|
+
objects: {
|
|
358
|
+
JSONSchema: {
|
|
359
|
+
$visitor: JSONSchemaVisitor_2;
|
|
360
|
+
fixedFields: {
|
|
361
|
+
id: {
|
|
362
|
+
$ref: string;
|
|
363
|
+
};
|
|
364
|
+
$schema: {
|
|
365
|
+
$ref: string;
|
|
366
|
+
};
|
|
367
|
+
multipleOf: {
|
|
368
|
+
$ref: string;
|
|
369
|
+
};
|
|
370
|
+
maximum: {
|
|
371
|
+
$ref: string;
|
|
372
|
+
};
|
|
373
|
+
exclusiveMaximum: {
|
|
374
|
+
$ref: string;
|
|
375
|
+
};
|
|
376
|
+
minimum: {
|
|
377
|
+
$ref: string;
|
|
378
|
+
};
|
|
379
|
+
exclusiveMinimum: {
|
|
380
|
+
$ref: string;
|
|
381
|
+
};
|
|
382
|
+
maxLength: {
|
|
383
|
+
$ref: string;
|
|
384
|
+
};
|
|
385
|
+
minLength: {
|
|
386
|
+
$ref: string;
|
|
387
|
+
};
|
|
388
|
+
pattern: {
|
|
389
|
+
$ref: string;
|
|
390
|
+
};
|
|
391
|
+
additionalItems: SchemaOrReferenceVisitor;
|
|
392
|
+
items: JSONSchemaDraft4ItemsVisitor;
|
|
393
|
+
maxItems: {
|
|
394
|
+
$ref: string;
|
|
395
|
+
};
|
|
396
|
+
minItems: {
|
|
397
|
+
$ref: string;
|
|
398
|
+
};
|
|
399
|
+
uniqueItems: {
|
|
400
|
+
$ref: string;
|
|
401
|
+
};
|
|
402
|
+
maxProperties: {
|
|
403
|
+
$ref: string;
|
|
404
|
+
};
|
|
405
|
+
minProperties: {
|
|
406
|
+
$ref: string;
|
|
407
|
+
};
|
|
408
|
+
required: RequiredVisitor;
|
|
409
|
+
properties: PropertiesVisitor;
|
|
410
|
+
additionalProperties: SchemaOrReferenceVisitor;
|
|
411
|
+
patternProperties: PatternPropertiesVisitor;
|
|
412
|
+
dependencies: DependenciesVisitor;
|
|
413
|
+
enum: EnumVisitor;
|
|
414
|
+
type: TypeVisitor;
|
|
415
|
+
allOf: AllOfVisitor;
|
|
416
|
+
anyOf: AnyOfVisitor;
|
|
417
|
+
oneOf: OneOfVisitor;
|
|
418
|
+
not: SchemaOrReferenceVisitor;
|
|
419
|
+
definitions: DefinitionsVisitor;
|
|
420
|
+
title: {
|
|
421
|
+
$ref: string;
|
|
422
|
+
};
|
|
423
|
+
description: {
|
|
424
|
+
$ref: string;
|
|
425
|
+
};
|
|
426
|
+
default: {
|
|
427
|
+
$ref: string;
|
|
428
|
+
};
|
|
429
|
+
format: {
|
|
430
|
+
$ref: string;
|
|
431
|
+
};
|
|
432
|
+
base: {
|
|
433
|
+
$ref: string;
|
|
434
|
+
};
|
|
435
|
+
links: LinksVisitor;
|
|
436
|
+
media: {
|
|
437
|
+
$ref: string;
|
|
438
|
+
};
|
|
439
|
+
readOnly: {
|
|
440
|
+
$ref: string;
|
|
441
|
+
};
|
|
442
|
+
};
|
|
443
|
+
};
|
|
444
|
+
JSONReference: {
|
|
445
|
+
$visitor: JSONReferenceVisitor;
|
|
446
|
+
fixedFields: {
|
|
447
|
+
$ref: JSONReference$RefVisitor;
|
|
448
|
+
};
|
|
449
|
+
};
|
|
450
|
+
Media: {
|
|
451
|
+
$visitor: MediaVisitor;
|
|
452
|
+
fixedFields: {
|
|
453
|
+
binaryEncoding: {
|
|
454
|
+
$ref: string;
|
|
455
|
+
};
|
|
456
|
+
type: {
|
|
457
|
+
$ref: string;
|
|
458
|
+
};
|
|
459
|
+
};
|
|
460
|
+
};
|
|
461
|
+
LinkDescription: {
|
|
462
|
+
$visitor: LinkDescriptionVisitor_2;
|
|
463
|
+
fixedFields: {
|
|
464
|
+
href: {
|
|
465
|
+
$ref: string;
|
|
466
|
+
};
|
|
467
|
+
rel: {
|
|
468
|
+
$ref: string;
|
|
469
|
+
};
|
|
470
|
+
title: {
|
|
471
|
+
$ref: string;
|
|
472
|
+
};
|
|
473
|
+
targetSchema: SchemaOrReferenceVisitor;
|
|
474
|
+
mediaType: {
|
|
475
|
+
$ref: string;
|
|
476
|
+
};
|
|
477
|
+
method: {
|
|
478
|
+
$ref: string;
|
|
479
|
+
};
|
|
480
|
+
encType: {
|
|
481
|
+
$ref: string;
|
|
482
|
+
};
|
|
483
|
+
schema: SchemaOrReferenceVisitor;
|
|
484
|
+
};
|
|
485
|
+
};
|
|
486
|
+
};
|
|
487
|
+
};
|
|
488
|
+
};
|
|
489
|
+
} | undefined;
|
|
490
|
+
}) => T;
|
|
491
|
+
|
|
492
|
+
/**
|
|
493
|
+
* @public
|
|
494
|
+
*/
|
|
495
|
+
export declare const refractorPluginReplaceEmptyElement: () => () => {
|
|
496
|
+
visitor: {
|
|
497
|
+
StringElement(element: StringElement, key: any, parent: any, path: any, ancestors: any[]): any;
|
|
498
|
+
};
|
|
499
|
+
};
|
|
500
|
+
|
|
501
|
+
export { SchemaOrReferenceVisitor }
|
|
502
|
+
|
|
503
|
+
export { SchemaOrReferenceVisitorOptions }
|
|
504
|
+
|
|
505
|
+
export declare const specificationObj: typeof specificationObj_2;
|
|
506
|
+
|
|
507
|
+
export { SpecificationVisitor }
|
|
508
|
+
|
|
509
|
+
export { SpecificationVisitorOptions }
|
|
510
|
+
|
|
511
|
+
export { SpecPath }
|
|
512
|
+
|
|
513
|
+
export { Visitor }
|
|
514
|
+
|
|
515
|
+
export { VisitorOptions }
|
|
516
|
+
|
|
517
|
+
export { }
|