@swagger-api/apidom-ns-json-schema-2020-12 1.0.0-beta.10
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 +18 -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 +83 -0
- package/README.md +186 -0
- package/dist/apidom-ns-json-schema-2020-12.browser.js +1 -0
- package/package.json +64 -0
- package/src/elements/JSONSchema.cjs +148 -0
- package/src/elements/JSONSchema.mjs +145 -0
- package/src/elements/LinkDescription.cjs +50 -0
- package/src/elements/LinkDescription.mjs +46 -0
- package/src/index.cjs +48 -0
- package/src/index.mjs +15 -0
- package/src/media-types.cjs +34 -0
- package/src/media-types.mjs +30 -0
- package/src/namespace.cjs +21 -0
- package/src/namespace.mjs +16 -0
- package/src/predicates.cjs +29 -0
- package/src/predicates.mjs +24 -0
- package/src/refractor/index.cjs +54 -0
- package/src/refractor/index.mjs +48 -0
- package/src/refractor/plugins/replace-empty-element.cjs +264 -0
- package/src/refractor/plugins/replace-empty-element.mjs +257 -0
- package/src/refractor/registration.cjs +13 -0
- package/src/refractor/registration.mjs +6 -0
- package/src/refractor/specification.cjs +16 -0
- package/src/refractor/specification.mjs +11 -0
- package/src/refractor/toolbox.cjs +21 -0
- package/src/refractor/toolbox.mjs +15 -0
- package/src/refractor/visitors/json-schema/PrefixItemsVisitor.cjs +30 -0
- package/src/refractor/visitors/json-schema/PrefixItemsVisitor.mjs +27 -0
- package/src/refractor/visitors/json-schema/index.cjs +22 -0
- package/src/refractor/visitors/json-schema/index.mjs +17 -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 +15 -0
- package/src/traversal/visitor.mjs +10 -0
- package/types/apidom-ns-json-schema-2020-12.d.ts +443 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault").default;
|
|
4
|
+
var _interopRequireWildcard = require("@babel/runtime-corejs3/helpers/interopRequireWildcard").default;
|
|
5
|
+
exports.__esModule = true;
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _apidomCore = require("@swagger-api/apidom-core");
|
|
8
|
+
var jsonSchema202012Predicates = _interopRequireWildcard(require("../predicates.cjs"));
|
|
9
|
+
var _namespace = _interopRequireDefault(require("../namespace.cjs"));
|
|
10
|
+
const createToolbox = () => {
|
|
11
|
+
const namespace = (0, _apidomCore.createNamespace)(_namespace.default);
|
|
12
|
+
const predicates = {
|
|
13
|
+
...jsonSchema202012Predicates,
|
|
14
|
+
isStringElement: _apidomCore.isStringElement
|
|
15
|
+
};
|
|
16
|
+
return {
|
|
17
|
+
predicates,
|
|
18
|
+
namespace
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
var _default = exports.default = createToolbox;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { createNamespace, isStringElement } from '@swagger-api/apidom-core';
|
|
2
|
+
import * as jsonSchema202012Predicates from "../predicates.mjs";
|
|
3
|
+
import jsonSchema202012Namespace from "../namespace.mjs";
|
|
4
|
+
const createToolbox = () => {
|
|
5
|
+
const namespace = createNamespace(jsonSchema202012Namespace);
|
|
6
|
+
const predicates = {
|
|
7
|
+
...jsonSchema202012Predicates,
|
|
8
|
+
isStringElement
|
|
9
|
+
};
|
|
10
|
+
return {
|
|
11
|
+
predicates,
|
|
12
|
+
namespace
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
export default createToolbox;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.default = void 0;
|
|
5
|
+
var _tsMixer = require("ts-mixer");
|
|
6
|
+
var _apidomCore = require("@swagger-api/apidom-core");
|
|
7
|
+
var _apidomNsJsonSchema = require("@swagger-api/apidom-ns-json-schema-2019-09");
|
|
8
|
+
/**
|
|
9
|
+
* @public
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* @public
|
|
14
|
+
*/
|
|
15
|
+
class PrefixItemsVisitor extends (0, _tsMixer.Mixin)(_apidomNsJsonSchema.SpecificationVisitor, _apidomNsJsonSchema.ParentSchemaAwareVisitor, _apidomNsJsonSchema.FallbackVisitor) {
|
|
16
|
+
constructor(options) {
|
|
17
|
+
super(options);
|
|
18
|
+
this.element = new _apidomCore.ArrayElement();
|
|
19
|
+
this.element.classes.push('json-schema-prefixItems');
|
|
20
|
+
}
|
|
21
|
+
ArrayElement(arrayElement) {
|
|
22
|
+
arrayElement.forEach(item => {
|
|
23
|
+
const element = this.toRefractedElement(['document', 'objects', 'JSONSchema'], item);
|
|
24
|
+
this.element.push(element);
|
|
25
|
+
});
|
|
26
|
+
this.copyMetaAndAttributes(arrayElement, this.element);
|
|
27
|
+
return _apidomCore.BREAK;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
var _default = exports.default = PrefixItemsVisitor;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { Mixin } from 'ts-mixer';
|
|
2
|
+
import { ArrayElement, BREAK } from '@swagger-api/apidom-core';
|
|
3
|
+
import { SpecificationVisitor, FallbackVisitor, ParentSchemaAwareVisitor } from '@swagger-api/apidom-ns-json-schema-2019-09';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* @public
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* @public
|
|
11
|
+
*/
|
|
12
|
+
class PrefixItemsVisitor extends Mixin(SpecificationVisitor, ParentSchemaAwareVisitor, FallbackVisitor) {
|
|
13
|
+
constructor(options) {
|
|
14
|
+
super(options);
|
|
15
|
+
this.element = new ArrayElement();
|
|
16
|
+
this.element.classes.push('json-schema-prefixItems');
|
|
17
|
+
}
|
|
18
|
+
ArrayElement(arrayElement) {
|
|
19
|
+
arrayElement.forEach(item => {
|
|
20
|
+
const element = this.toRefractedElement(['document', 'objects', 'JSONSchema'], item);
|
|
21
|
+
this.element.push(element);
|
|
22
|
+
});
|
|
23
|
+
this.copyMetaAndAttributes(arrayElement, this.element);
|
|
24
|
+
return BREAK;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
export default PrefixItemsVisitor;
|
|
@@ -0,0 +1,22 @@
|
|
|
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 _apidomNsJsonSchema = require("@swagger-api/apidom-ns-json-schema-2019-09");
|
|
7
|
+
var _JSONSchema = _interopRequireDefault(require("../../../elements/JSONSchema.cjs"));
|
|
8
|
+
/**
|
|
9
|
+
* @public
|
|
10
|
+
*/
|
|
11
|
+
class JSONSchemaVisitor extends _apidomNsJsonSchema.JSONSchemaVisitor {
|
|
12
|
+
constructor(options) {
|
|
13
|
+
super(options);
|
|
14
|
+
this.element = new _JSONSchema.default();
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
// eslint-disable-next-line class-methods-use-this
|
|
18
|
+
get defaultDialectIdentifier() {
|
|
19
|
+
return 'https://json-schema.org/draft/2020-12/schema';
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
var _default = exports.default = JSONSchemaVisitor;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { JSONSchemaVisitor as JSONSchema201909Visitor } from '@swagger-api/apidom-ns-json-schema-2019-09';
|
|
2
|
+
import JSONSchemaElement from "../../../elements/JSONSchema.mjs";
|
|
3
|
+
/**
|
|
4
|
+
* @public
|
|
5
|
+
*/
|
|
6
|
+
class JSONSchemaVisitor extends JSONSchema201909Visitor {
|
|
7
|
+
constructor(options) {
|
|
8
|
+
super(options);
|
|
9
|
+
this.element = new JSONSchemaElement();
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
// eslint-disable-next-line class-methods-use-this
|
|
13
|
+
get defaultDialectIdentifier() {
|
|
14
|
+
return 'https://json-schema.org/draft/2020-12/schema';
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
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 _apidomNsJsonSchema = require("@swagger-api/apidom-ns-json-schema-2019-09");
|
|
7
|
+
var _LinkDescription = _interopRequireDefault(require("../../../../elements/LinkDescription.cjs"));
|
|
8
|
+
/**
|
|
9
|
+
* @public
|
|
10
|
+
*/
|
|
11
|
+
class LinkDescriptionVisitor extends _apidomNsJsonSchema.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 JSONSchemaDraft201909LinkDescriptionVisitor } from '@swagger-api/apidom-ns-json-schema-2019-09';
|
|
2
|
+
import LinkDescriptionElement from "../../../../elements/LinkDescription.mjs";
|
|
3
|
+
/**
|
|
4
|
+
* @public
|
|
5
|
+
*/
|
|
6
|
+
class LinkDescriptionVisitor extends JSONSchemaDraft201909LinkDescriptionVisitor {
|
|
7
|
+
constructor(options) {
|
|
8
|
+
super(options);
|
|
9
|
+
this.element = new LinkDescriptionElement();
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
export default LinkDescriptionVisitor;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.keyMap = exports.getNodeType = void 0;
|
|
5
|
+
var _apidomCore = require("@swagger-api/apidom-core");
|
|
6
|
+
var _apidomNsJsonSchema = require("@swagger-api/apidom-ns-json-schema-2019-09");
|
|
7
|
+
exports.getNodeType = _apidomNsJsonSchema.getNodeType;
|
|
8
|
+
/**
|
|
9
|
+
* @public
|
|
10
|
+
*/
|
|
11
|
+
const keyMap = exports.keyMap = {
|
|
12
|
+
JSONSchema202012Element: ['content'],
|
|
13
|
+
LinkDescriptionElement: ['content'],
|
|
14
|
+
..._apidomCore.keyMap
|
|
15
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { keyMap as keyMapBase } from '@swagger-api/apidom-core';
|
|
2
|
+
export { getNodeType } from '@swagger-api/apidom-ns-json-schema-2019-09';
|
|
3
|
+
/**
|
|
4
|
+
* @public
|
|
5
|
+
*/
|
|
6
|
+
export const keyMap = {
|
|
7
|
+
JSONSchema202012Element: ['content'],
|
|
8
|
+
LinkDescriptionElement: ['content'],
|
|
9
|
+
...keyMapBase
|
|
10
|
+
};
|
|
@@ -0,0 +1,443 @@
|
|
|
1
|
+
import { AllOfVisitor } from '@swagger-api/apidom-ns-json-schema-draft-4';
|
|
2
|
+
import { AlternatingVisitor } from '@swagger-api/apidom-ns-json-schema-2019-09';
|
|
3
|
+
import { AlternatingVisitorOptions } from '@swagger-api/apidom-ns-json-schema-2019-09';
|
|
4
|
+
import { AnyOfVisitor } from '@swagger-api/apidom-ns-json-schema-draft-4';
|
|
5
|
+
import { ArrayElement } from '@swagger-api/apidom-core';
|
|
6
|
+
import { Attributes } from '@swagger-api/apidom-core';
|
|
7
|
+
import { BooleanElement } from '@swagger-api/apidom-core';
|
|
8
|
+
import { Class } from 'ts-mixer/dist/types/types.js';
|
|
9
|
+
import { DefinitionsVisitor } from '@swagger-api/apidom-ns-json-schema-draft-4';
|
|
10
|
+
import { DependenciesVisitor } from '@swagger-api/apidom-ns-json-schema-draft-4';
|
|
11
|
+
import { Element as Element_2 } from '@swagger-api/apidom-core';
|
|
12
|
+
import { ElementPredicate } from '@swagger-api/apidom-core';
|
|
13
|
+
import { EnumVisitor } from '@swagger-api/apidom-ns-json-schema-draft-4';
|
|
14
|
+
import { FallbackVisitor } from '@swagger-api/apidom-ns-json-schema-2019-09';
|
|
15
|
+
import { FallbackVisitor as FallbackVisitor_2 } from '@swagger-api/apidom-ns-json-schema-draft-4';
|
|
16
|
+
import { FallbackVisitorOptions } from '@swagger-api/apidom-ns-json-schema-2019-09';
|
|
17
|
+
import { FixedFieldsVisitor } from '@swagger-api/apidom-ns-json-schema-2019-09';
|
|
18
|
+
import { FixedFieldsVisitorOptions } from '@swagger-api/apidom-ns-json-schema-2019-09';
|
|
19
|
+
import { isArrayElement } from '@swagger-api/apidom-core';
|
|
20
|
+
import { isBooleanElement } from '@swagger-api/apidom-core';
|
|
21
|
+
import { isElement } from '@swagger-api/apidom-core';
|
|
22
|
+
import { isLinkElement } from '@swagger-api/apidom-core';
|
|
23
|
+
import { isMemberElement } from '@swagger-api/apidom-core';
|
|
24
|
+
import { isNullElement } from '@swagger-api/apidom-core';
|
|
25
|
+
import { isNumberElement } from '@swagger-api/apidom-core';
|
|
26
|
+
import { isObjectElement } from '@swagger-api/apidom-core';
|
|
27
|
+
import { isRefElement } from '@swagger-api/apidom-core';
|
|
28
|
+
import { isStringElement } from '@swagger-api/apidom-core';
|
|
29
|
+
import { ItemsVisitor } from '@swagger-api/apidom-ns-json-schema-draft-4';
|
|
30
|
+
import { JSONReference$RefVisitor } from '@swagger-api/apidom-ns-json-schema-draft-4';
|
|
31
|
+
import { JSONReferenceVisitor } from '@swagger-api/apidom-ns-json-schema-draft-4';
|
|
32
|
+
import { JSONSchemaElement as JSONSchemaElement_2 } from '@swagger-api/apidom-ns-json-schema-2019-09';
|
|
33
|
+
import { JSONSchemaVisitor as JSONSchemaVisitor_2 } from '@swagger-api/apidom-ns-json-schema-draft-4';
|
|
34
|
+
import { JSONSchemaVisitor as JSONSchemaVisitor_3 } from '@swagger-api/apidom-ns-json-schema-2019-09';
|
|
35
|
+
import { JSONSchemaVisitorOptions } from '@swagger-api/apidom-ns-json-schema-2019-09';
|
|
36
|
+
import { LinkDescriptionElement as LinkDescriptionElement_2 } from '@swagger-api/apidom-ns-json-schema-2019-09';
|
|
37
|
+
import { LinkDescriptionVisitor as LinkDescriptionVisitor_2 } from '@swagger-api/apidom-ns-json-schema-draft-4';
|
|
38
|
+
import { LinkDescriptionVisitor as LinkDescriptionVisitor_3 } from '@swagger-api/apidom-ns-json-schema-2019-09';
|
|
39
|
+
import { LinkDescriptionVisitorOptions } from '@swagger-api/apidom-ns-json-schema-2019-09';
|
|
40
|
+
import { LinksVisitor } from '@swagger-api/apidom-ns-json-schema-draft-4';
|
|
41
|
+
import { MapVisitor } from '@swagger-api/apidom-ns-json-schema-2019-09';
|
|
42
|
+
import { MapVisitorOptions } from '@swagger-api/apidom-ns-json-schema-2019-09';
|
|
43
|
+
import { MediaTypes } from '@swagger-api/apidom-core';
|
|
44
|
+
import { MediaVisitor } from '@swagger-api/apidom-ns-json-schema-draft-4';
|
|
45
|
+
import { Meta } from '@swagger-api/apidom-core';
|
|
46
|
+
import { Namespace } from 'minim';
|
|
47
|
+
import { NamespacePluginOptions } from '@swagger-api/apidom-core';
|
|
48
|
+
import { OneOfVisitor } from '@swagger-api/apidom-ns-json-schema-draft-4';
|
|
49
|
+
import { ParentSchemaAwareVisitor } from '@swagger-api/apidom-ns-json-schema-2019-09';
|
|
50
|
+
import { ParentSchemaAwareVisitorOptions } from '@swagger-api/apidom-ns-json-schema-2019-09';
|
|
51
|
+
import { PatternedFieldsVisitor } from '@swagger-api/apidom-ns-json-schema-2019-09';
|
|
52
|
+
import { PatternedFieldsVisitorOptions } from '@swagger-api/apidom-ns-json-schema-2019-09';
|
|
53
|
+
import { PatternPropertiesVisitor } from '@swagger-api/apidom-ns-json-schema-draft-4';
|
|
54
|
+
import { PropertiesVisitor } from '@swagger-api/apidom-ns-json-schema-draft-4';
|
|
55
|
+
import { RequiredVisitor } from '@swagger-api/apidom-ns-json-schema-draft-4';
|
|
56
|
+
import { SchemaOrReferenceVisitor } from '@swagger-api/apidom-ns-json-schema-draft-4';
|
|
57
|
+
import { specificationObj as specificationObj_2 } from '@swagger-api/apidom-ns-json-schema-2019-09';
|
|
58
|
+
import { SpecificationVisitor } from '@swagger-api/apidom-ns-json-schema-2019-09';
|
|
59
|
+
import { SpecificationVisitorOptions } from '@swagger-api/apidom-ns-json-schema-2019-09';
|
|
60
|
+
import { SpecPath } from '@swagger-api/apidom-ns-json-schema-2019-09';
|
|
61
|
+
import { StringElement } from '@swagger-api/apidom-core';
|
|
62
|
+
import { TypeVisitor } from '@swagger-api/apidom-ns-json-schema-draft-4';
|
|
63
|
+
import { Visitor } from '@swagger-api/apidom-ns-json-schema-2019-09';
|
|
64
|
+
import { VisitorOptions } from '@swagger-api/apidom-ns-json-schema-2019-09';
|
|
65
|
+
|
|
66
|
+
export { AlternatingVisitor }
|
|
67
|
+
|
|
68
|
+
export { AlternatingVisitorOptions }
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* @public
|
|
72
|
+
*/
|
|
73
|
+
export declare const createRefractor: (specPath: string[]) => (value: unknown, options?: {}) => Element_2;
|
|
74
|
+
|
|
75
|
+
export { FallbackVisitor }
|
|
76
|
+
|
|
77
|
+
export { FallbackVisitorOptions }
|
|
78
|
+
|
|
79
|
+
export { FixedFieldsVisitor }
|
|
80
|
+
|
|
81
|
+
export { FixedFieldsVisitorOptions }
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* @public
|
|
85
|
+
*/
|
|
86
|
+
export declare type Format = 'generic' | 'json' | 'yaml';
|
|
87
|
+
|
|
88
|
+
export { isArrayElement }
|
|
89
|
+
|
|
90
|
+
export { isBooleanElement }
|
|
91
|
+
|
|
92
|
+
export { isElement }
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* @public
|
|
96
|
+
*/
|
|
97
|
+
export declare const isJSONSchemaElement: ElementPredicate<JSONSchemaElement>;
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* @public
|
|
101
|
+
*/
|
|
102
|
+
export declare const isLinkDescriptionElement: ElementPredicate<LinkDescriptionElement>;
|
|
103
|
+
|
|
104
|
+
export { isLinkElement }
|
|
105
|
+
|
|
106
|
+
export { isMemberElement }
|
|
107
|
+
|
|
108
|
+
export { isNullElement }
|
|
109
|
+
|
|
110
|
+
export { isNumberElement }
|
|
111
|
+
|
|
112
|
+
export { isObjectElement }
|
|
113
|
+
|
|
114
|
+
export { isRefElement }
|
|
115
|
+
|
|
116
|
+
export { isStringElement }
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* @public
|
|
120
|
+
*/
|
|
121
|
+
declare const jsonSchema202012: {
|
|
122
|
+
namespace: (options: NamespacePluginOptions) => Namespace;
|
|
123
|
+
};
|
|
124
|
+
export default jsonSchema202012;
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* @public
|
|
128
|
+
*/
|
|
129
|
+
export declare class JSONSchema202012MediaTypes extends MediaTypes<string> {
|
|
130
|
+
filterByFormat(format?: Format): string[];
|
|
131
|
+
findBy(version?: string, format?: Format): string;
|
|
132
|
+
latest(format?: Format): string;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* @public
|
|
137
|
+
*/
|
|
138
|
+
export declare class JSONSchemaElement extends JSONSchemaElement_2 {
|
|
139
|
+
constructor(content?: Record<string, unknown>, meta?: Meta, attributes?: Attributes);
|
|
140
|
+
/**
|
|
141
|
+
* Core vocabulary
|
|
142
|
+
*
|
|
143
|
+
* URI: https://json-schema.org/draft/2020-12/vocab/core
|
|
144
|
+
*/
|
|
145
|
+
get $dynamicAnchor(): StringElement | undefined;
|
|
146
|
+
set $dynamicAnchor($dynamicAnchor: StringElement | undefined);
|
|
147
|
+
get $recursiveAnchor(): BooleanElement | undefined;
|
|
148
|
+
set $recursiveAnchor($recursiveAnchor: BooleanElement | undefined);
|
|
149
|
+
get $dynamicRef(): StringElement | undefined;
|
|
150
|
+
set $dynamicRef($dynamicRef: StringElement | undefined);
|
|
151
|
+
get $recursiveRef(): StringElement | undefined;
|
|
152
|
+
set $recursiveRef($recursiveRef: StringElement | undefined);
|
|
153
|
+
/**
|
|
154
|
+
* Applicator vocabulary
|
|
155
|
+
*
|
|
156
|
+
* URI: https://json-schema.org/draft/2020-12/vocab/applicator
|
|
157
|
+
*/
|
|
158
|
+
get not(): this | BooleanElement | undefined;
|
|
159
|
+
set not(not: this | BooleanElement | undefined);
|
|
160
|
+
get if(): this | BooleanElement | undefined;
|
|
161
|
+
set if(ifSchema: this | BooleanElement | undefined);
|
|
162
|
+
get then(): this | BooleanElement | undefined;
|
|
163
|
+
set then(thenSchema: this | BooleanElement | undefined);
|
|
164
|
+
get else(): this | BooleanElement | undefined;
|
|
165
|
+
set else(elseSchema: this | BooleanElement | undefined);
|
|
166
|
+
get prefixItems(): ArrayElement | undefined;
|
|
167
|
+
set prefixItems(prefixItems: ArrayElement | undefined);
|
|
168
|
+
get items(): this | BooleanElement | undefined;
|
|
169
|
+
set items(items: this | BooleanElement | undefined);
|
|
170
|
+
get containsProp(): this | BooleanElement | undefined;
|
|
171
|
+
set containsProp(containsProp: this | BooleanElement | undefined);
|
|
172
|
+
get additionalProperties(): this | BooleanElement | undefined;
|
|
173
|
+
set additionalProperties(additionalProperties: this | BooleanElement | undefined);
|
|
174
|
+
get additionalItems(): this | BooleanElement | undefined;
|
|
175
|
+
set additionalItems(additionalItems: this | BooleanElement | undefined);
|
|
176
|
+
get propertyNames(): this | BooleanElement | undefined;
|
|
177
|
+
set propertyNames(propertyNames: this | BooleanElement | undefined);
|
|
178
|
+
/**
|
|
179
|
+
* Unevaluated Locations vocabulary
|
|
180
|
+
*
|
|
181
|
+
* URI: https://json-schema.org/draft/2020-12/json-schema-core#section-11
|
|
182
|
+
*/
|
|
183
|
+
get unevaluatedItems(): this | BooleanElement | undefined;
|
|
184
|
+
set unevaluatedItems(unevaluatedItems: this | BooleanElement | undefined);
|
|
185
|
+
get unevaluatedProperties(): this | BooleanElement | undefined;
|
|
186
|
+
set unevaluatedProperties(unevaluatedProperties: this | BooleanElement | undefined);
|
|
187
|
+
/**
|
|
188
|
+
* Vocabulary for the Contents of String-Encoded Data
|
|
189
|
+
*
|
|
190
|
+
* URI: https://json-schema.org/draft/2020-12/vocab/content
|
|
191
|
+
*/
|
|
192
|
+
get contentSchema(): this | BooleanElement | undefined;
|
|
193
|
+
set contentSchema(contentSchema: this | BooleanElement | undefined);
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
/**
|
|
197
|
+
* @public
|
|
198
|
+
*/
|
|
199
|
+
export declare class JSONSchemaVisitor extends JSONSchemaVisitor_3 {
|
|
200
|
+
element: JSONSchemaElement;
|
|
201
|
+
constructor(options: JSONSchemaVisitorOptions);
|
|
202
|
+
get defaultDialectIdentifier(): string;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
export { JSONSchemaVisitorOptions }
|
|
206
|
+
|
|
207
|
+
/**
|
|
208
|
+
* URI: https://json-schema.org/draft/2019-09/draft-handrews-json-schema-hyperschema-02#rfc.section.6
|
|
209
|
+
* @public
|
|
210
|
+
*/
|
|
211
|
+
export declare class LinkDescriptionElement extends LinkDescriptionElement_2 {
|
|
212
|
+
/**
|
|
213
|
+
* Link Target Attributes.
|
|
214
|
+
*
|
|
215
|
+
* URI: https://json-schema.org/draft/2019-09/draft-handrews-json-schema-hyperschema-02#rfc.section.6.5
|
|
216
|
+
*/
|
|
217
|
+
get targetSchema(): JSONSchemaElement | BooleanElement | undefined;
|
|
218
|
+
set targetSchema(targetSchema: JSONSchemaElement | BooleanElement | undefined);
|
|
219
|
+
/**
|
|
220
|
+
* Link Input.
|
|
221
|
+
*
|
|
222
|
+
* URI: https://json-schema.org/draft/2019-09/draft-handrews-json-schema-hyperschema-02#input
|
|
223
|
+
*/
|
|
224
|
+
get hrefSchema(): JSONSchemaElement | BooleanElement | undefined;
|
|
225
|
+
set hrefSchema(hrefSchema: JSONSchemaElement | BooleanElement | undefined);
|
|
226
|
+
get headerSchema(): JSONSchemaElement | BooleanElement | undefined;
|
|
227
|
+
set headerSchema(headerSchema: JSONSchemaElement | BooleanElement | undefined);
|
|
228
|
+
get submissionSchema(): JSONSchemaElement | BooleanElement | undefined;
|
|
229
|
+
set submissionSchema(submissionSchema: JSONSchemaElement | BooleanElement | undefined);
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
/**
|
|
233
|
+
* @public
|
|
234
|
+
*/
|
|
235
|
+
export declare class LinkDescriptionVisitor extends LinkDescriptionVisitor_3 {
|
|
236
|
+
readonly element: LinkDescriptionElement;
|
|
237
|
+
constructor(options: LinkDescriptionVisitorOptions);
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
export { LinkDescriptionVisitorOptions }
|
|
241
|
+
|
|
242
|
+
export { MapVisitor }
|
|
243
|
+
|
|
244
|
+
export { MapVisitorOptions }
|
|
245
|
+
|
|
246
|
+
/**
|
|
247
|
+
* @public
|
|
248
|
+
*/
|
|
249
|
+
export declare const mediaTypes: JSONSchema202012MediaTypes;
|
|
250
|
+
|
|
251
|
+
export { ParentSchemaAwareVisitor }
|
|
252
|
+
|
|
253
|
+
export { ParentSchemaAwareVisitorOptions }
|
|
254
|
+
|
|
255
|
+
export { PatternedFieldsVisitor }
|
|
256
|
+
|
|
257
|
+
export { PatternedFieldsVisitorOptions }
|
|
258
|
+
|
|
259
|
+
/**
|
|
260
|
+
* @public
|
|
261
|
+
*/
|
|
262
|
+
export declare class PrefixItemsVisitor extends PrefixItemsVisitor_base {
|
|
263
|
+
readonly element: ArrayElement;
|
|
264
|
+
constructor(options: PrefixItemsVisitorOptions);
|
|
265
|
+
ArrayElement(arrayElement: ArrayElement): {};
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
declare const PrefixItemsVisitor_base: Class<any[], SpecificationVisitor & ParentSchemaAwareVisitor & FallbackVisitor, typeof SpecificationVisitor & typeof ParentSchemaAwareVisitor & typeof FallbackVisitor>;
|
|
269
|
+
|
|
270
|
+
/**
|
|
271
|
+
* @public
|
|
272
|
+
*/
|
|
273
|
+
export declare interface PrefixItemsVisitorOptions extends SpecificationVisitorOptions, ParentSchemaAwareVisitorOptions, FallbackVisitorOptions {
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
/**
|
|
277
|
+
* @public
|
|
278
|
+
*/
|
|
279
|
+
export declare const refract: <T extends Element_2>(value: unknown, { specPath, plugins, specificationObj, }?: {
|
|
280
|
+
specPath?: string[] | undefined;
|
|
281
|
+
plugins?: never[] | undefined;
|
|
282
|
+
specificationObj?: {
|
|
283
|
+
visitors: {
|
|
284
|
+
value: FallbackVisitor_2;
|
|
285
|
+
JSONSchemaOrJSONReferenceVisitor: SchemaOrReferenceVisitor;
|
|
286
|
+
document: {
|
|
287
|
+
objects: {
|
|
288
|
+
JSONSchema: {
|
|
289
|
+
$visitor: JSONSchemaVisitor_2;
|
|
290
|
+
fixedFields: {
|
|
291
|
+
id: {
|
|
292
|
+
$ref: string;
|
|
293
|
+
};
|
|
294
|
+
$schema: {
|
|
295
|
+
$ref: string;
|
|
296
|
+
};
|
|
297
|
+
multipleOf: {
|
|
298
|
+
$ref: string;
|
|
299
|
+
};
|
|
300
|
+
maximum: {
|
|
301
|
+
$ref: string;
|
|
302
|
+
};
|
|
303
|
+
exclusiveMaximum: {
|
|
304
|
+
$ref: string;
|
|
305
|
+
};
|
|
306
|
+
minimum: {
|
|
307
|
+
$ref: string;
|
|
308
|
+
};
|
|
309
|
+
exclusiveMinimum: {
|
|
310
|
+
$ref: string;
|
|
311
|
+
};
|
|
312
|
+
maxLength: {
|
|
313
|
+
$ref: string;
|
|
314
|
+
};
|
|
315
|
+
minLength: {
|
|
316
|
+
$ref: string;
|
|
317
|
+
};
|
|
318
|
+
pattern: {
|
|
319
|
+
$ref: string;
|
|
320
|
+
};
|
|
321
|
+
additionalItems: SchemaOrReferenceVisitor;
|
|
322
|
+
items: ItemsVisitor;
|
|
323
|
+
maxItems: {
|
|
324
|
+
$ref: string;
|
|
325
|
+
};
|
|
326
|
+
minItems: {
|
|
327
|
+
$ref: string;
|
|
328
|
+
};
|
|
329
|
+
uniqueItems: {
|
|
330
|
+
$ref: string;
|
|
331
|
+
};
|
|
332
|
+
maxProperties: {
|
|
333
|
+
$ref: string;
|
|
334
|
+
};
|
|
335
|
+
minProperties: {
|
|
336
|
+
$ref: string;
|
|
337
|
+
};
|
|
338
|
+
required: RequiredVisitor;
|
|
339
|
+
properties: PropertiesVisitor;
|
|
340
|
+
additionalProperties: SchemaOrReferenceVisitor;
|
|
341
|
+
patternProperties: PatternPropertiesVisitor;
|
|
342
|
+
dependencies: DependenciesVisitor;
|
|
343
|
+
enum: EnumVisitor;
|
|
344
|
+
type: TypeVisitor;
|
|
345
|
+
allOf: AllOfVisitor;
|
|
346
|
+
anyOf: AnyOfVisitor;
|
|
347
|
+
oneOf: OneOfVisitor;
|
|
348
|
+
not: SchemaOrReferenceVisitor;
|
|
349
|
+
definitions: DefinitionsVisitor;
|
|
350
|
+
title: {
|
|
351
|
+
$ref: string;
|
|
352
|
+
};
|
|
353
|
+
description: {
|
|
354
|
+
$ref: string;
|
|
355
|
+
};
|
|
356
|
+
default: {
|
|
357
|
+
$ref: string;
|
|
358
|
+
};
|
|
359
|
+
format: {
|
|
360
|
+
$ref: string;
|
|
361
|
+
};
|
|
362
|
+
base: {
|
|
363
|
+
$ref: string;
|
|
364
|
+
};
|
|
365
|
+
links: LinksVisitor;
|
|
366
|
+
media: {
|
|
367
|
+
$ref: string;
|
|
368
|
+
};
|
|
369
|
+
readOnly: {
|
|
370
|
+
$ref: string;
|
|
371
|
+
};
|
|
372
|
+
};
|
|
373
|
+
};
|
|
374
|
+
JSONReference: {
|
|
375
|
+
$visitor: JSONReferenceVisitor;
|
|
376
|
+
fixedFields: {
|
|
377
|
+
$ref: JSONReference$RefVisitor;
|
|
378
|
+
};
|
|
379
|
+
};
|
|
380
|
+
Media: {
|
|
381
|
+
$visitor: MediaVisitor;
|
|
382
|
+
fixedFields: {
|
|
383
|
+
binaryEncoding: {
|
|
384
|
+
$ref: string;
|
|
385
|
+
};
|
|
386
|
+
type: {
|
|
387
|
+
$ref: string;
|
|
388
|
+
};
|
|
389
|
+
};
|
|
390
|
+
};
|
|
391
|
+
LinkDescription: {
|
|
392
|
+
$visitor: LinkDescriptionVisitor_2;
|
|
393
|
+
fixedFields: {
|
|
394
|
+
href: {
|
|
395
|
+
$ref: string;
|
|
396
|
+
};
|
|
397
|
+
rel: {
|
|
398
|
+
$ref: string;
|
|
399
|
+
};
|
|
400
|
+
title: {
|
|
401
|
+
$ref: string;
|
|
402
|
+
};
|
|
403
|
+
targetSchema: SchemaOrReferenceVisitor;
|
|
404
|
+
mediaType: {
|
|
405
|
+
$ref: string;
|
|
406
|
+
};
|
|
407
|
+
method: {
|
|
408
|
+
$ref: string;
|
|
409
|
+
};
|
|
410
|
+
encType: {
|
|
411
|
+
$ref: string;
|
|
412
|
+
};
|
|
413
|
+
schema: SchemaOrReferenceVisitor;
|
|
414
|
+
};
|
|
415
|
+
};
|
|
416
|
+
};
|
|
417
|
+
};
|
|
418
|
+
};
|
|
419
|
+
} | undefined;
|
|
420
|
+
}) => T;
|
|
421
|
+
|
|
422
|
+
/**
|
|
423
|
+
* @public
|
|
424
|
+
*/
|
|
425
|
+
export declare const refractorPluginReplaceEmptyElement: () => () => {
|
|
426
|
+
visitor: {
|
|
427
|
+
StringElement(element: StringElement, key: any, parent: any, path: any, ancestors: any[]): any;
|
|
428
|
+
};
|
|
429
|
+
};
|
|
430
|
+
|
|
431
|
+
export declare const specificationObj: typeof specificationObj_2;
|
|
432
|
+
|
|
433
|
+
export { SpecificationVisitor }
|
|
434
|
+
|
|
435
|
+
export { SpecificationVisitorOptions }
|
|
436
|
+
|
|
437
|
+
export { SpecPath }
|
|
438
|
+
|
|
439
|
+
export { Visitor }
|
|
440
|
+
|
|
441
|
+
export { VisitorOptions }
|
|
442
|
+
|
|
443
|
+
export { }
|