@speclynx/apidom-ns-json-schema-2019-09 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 +186 -0
- package/dist/apidom-ns-json-schema-2019-09.browser.js +1 -0
- package/package.json +65 -0
- package/src/elements/JSONSchema.cjs +214 -0
- package/src/elements/JSONSchema.mjs +211 -0
- package/src/elements/LinkDescription.cjs +48 -0
- package/src/elements/LinkDescription.mjs +44 -0
- package/src/index.cjs +73 -0
- package/src/index.mjs +26 -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 +257 -0
- package/src/refractor/plugins/replace-empty-element.mjs +250 -0
- package/src/refractor/registration.cjs +13 -0
- package/src/refractor/registration.mjs +6 -0
- package/src/refractor/specification.cjs +26 -0
- package/src/refractor/specification.mjs +21 -0
- package/src/refractor/toolbox.cjs +21 -0
- package/src/refractor/toolbox.mjs +15 -0
- package/src/refractor/visitors/json-schema/$defsVisitor.cjs +24 -0
- package/src/refractor/visitors/json-schema/$defsVisitor.mjs +21 -0
- package/src/refractor/visitors/json-schema/$refVisitor.cjs +16 -0
- package/src/refractor/visitors/json-schema/$refVisitor.mjs +12 -0
- package/src/refractor/visitors/json-schema/$vocabularyVisitor.cjs +16 -0
- package/src/refractor/visitors/json-schema/$vocabularyVisitor.mjs +12 -0
- package/src/refractor/visitors/json-schema/AllOfVisitor.cjs +30 -0
- package/src/refractor/visitors/json-schema/AllOfVisitor.mjs +27 -0
- package/src/refractor/visitors/json-schema/AnyOfVisitor.cjs +30 -0
- package/src/refractor/visitors/json-schema/AnyOfVisitor.mjs +27 -0
- package/src/refractor/visitors/json-schema/DependentRequiredVisitor.cjs +16 -0
- package/src/refractor/visitors/json-schema/DependentRequiredVisitor.mjs +12 -0
- package/src/refractor/visitors/json-schema/DependentSchemasVisitor.cjs +24 -0
- package/src/refractor/visitors/json-schema/DependentSchemasVisitor.mjs +21 -0
- package/src/refractor/visitors/json-schema/ItemsVisitor.cjs +35 -0
- package/src/refractor/visitors/json-schema/ItemsVisitor.mjs +32 -0
- package/src/refractor/visitors/json-schema/OneOfVisitor.cjs +30 -0
- package/src/refractor/visitors/json-schema/OneOfVisitor.mjs +27 -0
- package/src/refractor/visitors/json-schema/PatternPropertiesVisitor.cjs +24 -0
- package/src/refractor/visitors/json-schema/PatternPropertiesVisitor.mjs +21 -0
- package/src/refractor/visitors/json-schema/PropertiesVisitor.cjs +24 -0
- package/src/refractor/visitors/json-schema/PropertiesVisitor.mjs +21 -0
- package/src/refractor/visitors/json-schema/index.cjs +36 -0
- package/src/refractor/visitors/json-schema/index.mjs +31 -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 +11 -0
- package/types/apidom-ns-json-schema-2019-09.d.ts +648 -0
package/package.json
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@speclynx/apidom-ns-json-schema-2019-09",
|
|
3
|
+
"version": "1.12.1",
|
|
4
|
+
"description": "JSON Schema 2019-09 namespace for ApiDOM.",
|
|
5
|
+
"publishConfig": {
|
|
6
|
+
"access": "public",
|
|
7
|
+
"registry": "https://registry.npmjs.org",
|
|
8
|
+
"provenance": true
|
|
9
|
+
},
|
|
10
|
+
"type": "module",
|
|
11
|
+
"sideEffects": [
|
|
12
|
+
"./src/refractor/registration.mjs",
|
|
13
|
+
"./src/refractor/registration.cjs"
|
|
14
|
+
],
|
|
15
|
+
"unpkg": "./dist/apidom-ns-json-schema-2019-09.browser.min.js",
|
|
16
|
+
"main": "./src/index.cjs",
|
|
17
|
+
"exports": {
|
|
18
|
+
"types": "./types/apidom-ns-json-schema-2019-09.d.ts",
|
|
19
|
+
"import": "./src/index.mjs",
|
|
20
|
+
"require": "./src/index.cjs"
|
|
21
|
+
},
|
|
22
|
+
"types": "./types/apidom-ns-json-schema-2019-09.d.ts",
|
|
23
|
+
"scripts": {
|
|
24
|
+
"build": "npm run clean && run-p --max-parallel ${CPU_CORES:-2} typescript:declaration build:es build:cjs build:umd:browser",
|
|
25
|
+
"build:es": "cross-env BABEL_ENV=es babel src --out-dir src --extensions '.ts' --out-file-extension '.mjs' --root-mode 'upward'",
|
|
26
|
+
"build:cjs": "cross-env BABEL_ENV=cjs babel src --out-dir src --extensions '.ts' --out-file-extension '.cjs' --root-mode 'upward'",
|
|
27
|
+
"build:umd:browser": "cross-env BABEL_ENV=browser webpack --config config/webpack/browser.config.js --progress",
|
|
28
|
+
"lint": "eslint ./",
|
|
29
|
+
"lint:fix": "eslint ./ --fix",
|
|
30
|
+
"clean": "rimraf --glob 'src/**/*.mjs' 'src/**/*.cjs' 'test/**/*.mjs' ./dist ./types",
|
|
31
|
+
"test": "npm run build:es && cross-env BABEL_ENV=es babel test --out-dir test --extensions '.ts' --out-file-extension '.mjs' --root-mode 'upward' && cross-env NODE_ENV=test mocha",
|
|
32
|
+
"test:update-snapshots": "cross-env UPDATE_SNAPSHOT=1 mocha",
|
|
33
|
+
"typescript:check-types": "tsc --noEmit && tsc -p ./test/tsconfig.json --noEmit",
|
|
34
|
+
"typescript:declaration": "tsc -p tsconfig.declaration.json && api-extractor run -l -c ./config/api-extractor/api-extractor.json 2>&1 | shx grep -v 'Visitor_base'",
|
|
35
|
+
"prepack": "copyfiles -u 3 ../../LICENSES/* LICENSES && copyfiles -u 2 ../../NOTICE .",
|
|
36
|
+
"postpack": "rimraf NOTICE LICENSES"
|
|
37
|
+
},
|
|
38
|
+
"repository": {
|
|
39
|
+
"type": "git",
|
|
40
|
+
"url": "git+https://github.com/speclynx/apidom.git"
|
|
41
|
+
},
|
|
42
|
+
"author": "Vladimir Gorej",
|
|
43
|
+
"license": "Apache-2.0",
|
|
44
|
+
"dependencies": {
|
|
45
|
+
"@babel/runtime-corejs3": "^7.28.4",
|
|
46
|
+
"@speclynx/apidom-core": "^1.12.1",
|
|
47
|
+
"@speclynx/apidom-error": "^1.12.1",
|
|
48
|
+
"@speclynx/apidom-ns-json-schema-draft-7": "^1.12.1",
|
|
49
|
+
"@types/ramda": "~0.30.0",
|
|
50
|
+
"ramda": "~0.32.0",
|
|
51
|
+
"ramda-adjunct": "^6.0.0",
|
|
52
|
+
"ts-mixer": "^6.0.4"
|
|
53
|
+
},
|
|
54
|
+
"files": [
|
|
55
|
+
"src/**/*.mjs",
|
|
56
|
+
"src/**/*.cjs",
|
|
57
|
+
"dist/",
|
|
58
|
+
"types/apidom-ns-json-schema-2019-09.d.ts",
|
|
59
|
+
"LICENSES",
|
|
60
|
+
"NOTICE",
|
|
61
|
+
"README.md",
|
|
62
|
+
"CHANGELOG.md"
|
|
63
|
+
],
|
|
64
|
+
"gitHead": "49be88493f922c4ace2e4ebc0f23387ccb62c4fc"
|
|
65
|
+
}
|
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.default = void 0;
|
|
5
|
+
var _apidomError = require("@speclynx/apidom-error");
|
|
6
|
+
var _apidomNsJsonSchemaDraft = require("@speclynx/apidom-ns-json-schema-draft-7");
|
|
7
|
+
/**
|
|
8
|
+
* @public
|
|
9
|
+
*/
|
|
10
|
+
class JSONSchema extends _apidomNsJsonSchemaDraft.JSONSchemaElement {
|
|
11
|
+
constructor(content, meta, attributes) {
|
|
12
|
+
super(content, meta, attributes);
|
|
13
|
+
this.element = 'JSONSchema201909';
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Core vocabulary
|
|
18
|
+
*
|
|
19
|
+
* URI: https://json-schema.org/draft/2019-09/vocab/core
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
get $vocabulary() {
|
|
23
|
+
return this.get('$vocabulary');
|
|
24
|
+
}
|
|
25
|
+
set $vocabulary($vocabulary) {
|
|
26
|
+
this.set('$vocabulary', $vocabulary);
|
|
27
|
+
}
|
|
28
|
+
get $anchor() {
|
|
29
|
+
return this.get('$anchor');
|
|
30
|
+
}
|
|
31
|
+
set $anchor($anchor) {
|
|
32
|
+
this.set('$anchor', $anchor);
|
|
33
|
+
}
|
|
34
|
+
get $recursiveAnchor() {
|
|
35
|
+
return this.get('$recursiveAnchor');
|
|
36
|
+
}
|
|
37
|
+
set $recursiveAnchor($recursiveAnchor) {
|
|
38
|
+
this.set('$recursiveAnchor', $recursiveAnchor);
|
|
39
|
+
}
|
|
40
|
+
get $recursiveRef() {
|
|
41
|
+
return this.get('$recursiveRef');
|
|
42
|
+
}
|
|
43
|
+
set $recursiveRef($recursiveRef) {
|
|
44
|
+
this.set('$recursiveRef', $recursiveRef);
|
|
45
|
+
}
|
|
46
|
+
get $ref() {
|
|
47
|
+
return this.get('$ref');
|
|
48
|
+
}
|
|
49
|
+
set $ref($ref) {
|
|
50
|
+
this.set('$ref', $ref);
|
|
51
|
+
}
|
|
52
|
+
get $defs() {
|
|
53
|
+
return this.get('$defs');
|
|
54
|
+
}
|
|
55
|
+
set $defs($defs) {
|
|
56
|
+
this.set('$defs', $defs);
|
|
57
|
+
}
|
|
58
|
+
get definitions() {
|
|
59
|
+
throw new _apidomError.UnsupportedOperationError('definitions keyword from Validation vocabulary has been renamed to $defs.');
|
|
60
|
+
}
|
|
61
|
+
set definitions(definitions) {
|
|
62
|
+
throw new _apidomError.UnsupportedOperationError('definitions keyword from Validation vocabulary has been renamed to $defs.');
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Applicator vocabulary
|
|
67
|
+
*
|
|
68
|
+
* URI: https://json-schema.org/draft/2019-09/vocab/applicator
|
|
69
|
+
*/
|
|
70
|
+
|
|
71
|
+
get not() {
|
|
72
|
+
return this.get('not');
|
|
73
|
+
}
|
|
74
|
+
set not(not) {
|
|
75
|
+
this.set('not', not);
|
|
76
|
+
}
|
|
77
|
+
get if() {
|
|
78
|
+
return this.get('if');
|
|
79
|
+
}
|
|
80
|
+
set if(ifSchema) {
|
|
81
|
+
this.set('if', ifSchema);
|
|
82
|
+
}
|
|
83
|
+
get then() {
|
|
84
|
+
return this.get('then');
|
|
85
|
+
}
|
|
86
|
+
set then(thenSchema) {
|
|
87
|
+
this.set('then', thenSchema);
|
|
88
|
+
}
|
|
89
|
+
get else() {
|
|
90
|
+
return this.get('else');
|
|
91
|
+
}
|
|
92
|
+
set else(elseSchema) {
|
|
93
|
+
this.set('else', elseSchema);
|
|
94
|
+
}
|
|
95
|
+
get dependentSchemas() {
|
|
96
|
+
return this.get('dependentSchemas');
|
|
97
|
+
}
|
|
98
|
+
set dependentSchemas(dependentSchemas) {
|
|
99
|
+
this.set('dependentSchemas', dependentSchemas);
|
|
100
|
+
}
|
|
101
|
+
get dependencies() {
|
|
102
|
+
throw new _apidomError.UnsupportedOperationError('dependencies keyword from Validation vocabulary has been renamed to dependentSchemas.');
|
|
103
|
+
}
|
|
104
|
+
set dependencies(dependencies) {
|
|
105
|
+
throw new _apidomError.UnsupportedOperationError('dependencies keyword from Validation vocabulary has been renamed to dependentSchemas.');
|
|
106
|
+
}
|
|
107
|
+
get items() {
|
|
108
|
+
return this.get('items');
|
|
109
|
+
}
|
|
110
|
+
set items(items) {
|
|
111
|
+
this.set('items', items);
|
|
112
|
+
}
|
|
113
|
+
get containsProp() {
|
|
114
|
+
return this.get('contains');
|
|
115
|
+
}
|
|
116
|
+
set containsProp(containsProp) {
|
|
117
|
+
this.set('contains', containsProp);
|
|
118
|
+
}
|
|
119
|
+
get additionalProperties() {
|
|
120
|
+
return this.get('additionalProperties');
|
|
121
|
+
}
|
|
122
|
+
set additionalProperties(additionalProperties) {
|
|
123
|
+
this.set('additionalProperties', additionalProperties);
|
|
124
|
+
}
|
|
125
|
+
get additionalItems() {
|
|
126
|
+
return this.get('additionalItems');
|
|
127
|
+
}
|
|
128
|
+
set additionalItems(additionalItems) {
|
|
129
|
+
this.set('additionalItems', additionalItems);
|
|
130
|
+
}
|
|
131
|
+
get propertyNames() {
|
|
132
|
+
return this.get('propertyNames');
|
|
133
|
+
}
|
|
134
|
+
set propertyNames(propertyNames) {
|
|
135
|
+
this.set('propertyNames', propertyNames);
|
|
136
|
+
}
|
|
137
|
+
get unevaluatedItems() {
|
|
138
|
+
return this.get('unevaluatedItems');
|
|
139
|
+
}
|
|
140
|
+
set unevaluatedItems(unevaluatedItems) {
|
|
141
|
+
this.set('unevaluatedItems', unevaluatedItems);
|
|
142
|
+
}
|
|
143
|
+
get unevaluatedProperties() {
|
|
144
|
+
return this.get('unevaluatedProperties');
|
|
145
|
+
}
|
|
146
|
+
set unevaluatedProperties(unevaluatedProperties) {
|
|
147
|
+
this.set('unevaluatedProperties', unevaluatedProperties);
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
/**
|
|
151
|
+
* Validation vocabulary
|
|
152
|
+
*
|
|
153
|
+
* URI: https://json-schema.org/draft/2019-09/json-schema-validation#rfc.section.6
|
|
154
|
+
*/
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* Validation Keywords for Arrays
|
|
158
|
+
*
|
|
159
|
+
* URI: https://json-schema.org/draft/2019-09/draft-handrews-json-schema-validation-02#rfc.section.6.4
|
|
160
|
+
*/
|
|
161
|
+
|
|
162
|
+
get maxContains() {
|
|
163
|
+
return this.get('maxContains');
|
|
164
|
+
}
|
|
165
|
+
set maxContains(maxContains) {
|
|
166
|
+
this.set('maxContains', maxContains);
|
|
167
|
+
}
|
|
168
|
+
get minContains() {
|
|
169
|
+
return this.get('minContains');
|
|
170
|
+
}
|
|
171
|
+
set minContains(minContains) {
|
|
172
|
+
this.set('minContains', minContains);
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
/**
|
|
176
|
+
* Validation Keywords for Objects
|
|
177
|
+
*
|
|
178
|
+
* URI: https://json-schema.org/draft/2019-09/draft-handrews-json-schema-validation-02#rfc.section.6.5
|
|
179
|
+
*/
|
|
180
|
+
|
|
181
|
+
get dependentRequired() {
|
|
182
|
+
return this.get('dependentRequired');
|
|
183
|
+
}
|
|
184
|
+
set dependentRequired(dependentRequired) {
|
|
185
|
+
this.set('dependentRequired', dependentRequired);
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
/**
|
|
189
|
+
* Vocabulary for Basic Meta-Data Annotations
|
|
190
|
+
*
|
|
191
|
+
* URI: https://json-schema.org/draft/2019-09/vocab/meta-data
|
|
192
|
+
*/
|
|
193
|
+
|
|
194
|
+
get deprecated() {
|
|
195
|
+
return this.get('deprecated');
|
|
196
|
+
}
|
|
197
|
+
set deprecated(deprecated) {
|
|
198
|
+
this.set('deprecated', deprecated);
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
/**
|
|
202
|
+
* Vocabulary for the Contents of String-Encoded Data
|
|
203
|
+
*
|
|
204
|
+
* URI: https://json-schema.org/draft/2019-09/vocab/content
|
|
205
|
+
*/
|
|
206
|
+
|
|
207
|
+
get contentSchema() {
|
|
208
|
+
return this.get('contentSchema');
|
|
209
|
+
}
|
|
210
|
+
set contentSchema(contentSchema) {
|
|
211
|
+
this.set('contentSchema', contentSchema);
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
var _default = exports.default = JSONSchema;
|
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
import { UnsupportedOperationError } from '@speclynx/apidom-error';
|
|
2
|
+
import { JSONSchemaElement } from '@speclynx/apidom-ns-json-schema-draft-7';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* @public
|
|
6
|
+
*/
|
|
7
|
+
class JSONSchema extends JSONSchemaElement {
|
|
8
|
+
constructor(content, meta, attributes) {
|
|
9
|
+
super(content, meta, attributes);
|
|
10
|
+
this.element = 'JSONSchema201909';
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Core vocabulary
|
|
15
|
+
*
|
|
16
|
+
* URI: https://json-schema.org/draft/2019-09/vocab/core
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
get $vocabulary() {
|
|
20
|
+
return this.get('$vocabulary');
|
|
21
|
+
}
|
|
22
|
+
set $vocabulary($vocabulary) {
|
|
23
|
+
this.set('$vocabulary', $vocabulary);
|
|
24
|
+
}
|
|
25
|
+
get $anchor() {
|
|
26
|
+
return this.get('$anchor');
|
|
27
|
+
}
|
|
28
|
+
set $anchor($anchor) {
|
|
29
|
+
this.set('$anchor', $anchor);
|
|
30
|
+
}
|
|
31
|
+
get $recursiveAnchor() {
|
|
32
|
+
return this.get('$recursiveAnchor');
|
|
33
|
+
}
|
|
34
|
+
set $recursiveAnchor($recursiveAnchor) {
|
|
35
|
+
this.set('$recursiveAnchor', $recursiveAnchor);
|
|
36
|
+
}
|
|
37
|
+
get $recursiveRef() {
|
|
38
|
+
return this.get('$recursiveRef');
|
|
39
|
+
}
|
|
40
|
+
set $recursiveRef($recursiveRef) {
|
|
41
|
+
this.set('$recursiveRef', $recursiveRef);
|
|
42
|
+
}
|
|
43
|
+
get $ref() {
|
|
44
|
+
return this.get('$ref');
|
|
45
|
+
}
|
|
46
|
+
set $ref($ref) {
|
|
47
|
+
this.set('$ref', $ref);
|
|
48
|
+
}
|
|
49
|
+
get $defs() {
|
|
50
|
+
return this.get('$defs');
|
|
51
|
+
}
|
|
52
|
+
set $defs($defs) {
|
|
53
|
+
this.set('$defs', $defs);
|
|
54
|
+
}
|
|
55
|
+
get definitions() {
|
|
56
|
+
throw new UnsupportedOperationError('definitions keyword from Validation vocabulary has been renamed to $defs.');
|
|
57
|
+
}
|
|
58
|
+
set definitions(definitions) {
|
|
59
|
+
throw new UnsupportedOperationError('definitions keyword from Validation vocabulary has been renamed to $defs.');
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Applicator vocabulary
|
|
64
|
+
*
|
|
65
|
+
* URI: https://json-schema.org/draft/2019-09/vocab/applicator
|
|
66
|
+
*/
|
|
67
|
+
|
|
68
|
+
get not() {
|
|
69
|
+
return this.get('not');
|
|
70
|
+
}
|
|
71
|
+
set not(not) {
|
|
72
|
+
this.set('not', not);
|
|
73
|
+
}
|
|
74
|
+
get if() {
|
|
75
|
+
return this.get('if');
|
|
76
|
+
}
|
|
77
|
+
set if(ifSchema) {
|
|
78
|
+
this.set('if', ifSchema);
|
|
79
|
+
}
|
|
80
|
+
get then() {
|
|
81
|
+
return this.get('then');
|
|
82
|
+
}
|
|
83
|
+
set then(thenSchema) {
|
|
84
|
+
this.set('then', thenSchema);
|
|
85
|
+
}
|
|
86
|
+
get else() {
|
|
87
|
+
return this.get('else');
|
|
88
|
+
}
|
|
89
|
+
set else(elseSchema) {
|
|
90
|
+
this.set('else', elseSchema);
|
|
91
|
+
}
|
|
92
|
+
get dependentSchemas() {
|
|
93
|
+
return this.get('dependentSchemas');
|
|
94
|
+
}
|
|
95
|
+
set dependentSchemas(dependentSchemas) {
|
|
96
|
+
this.set('dependentSchemas', dependentSchemas);
|
|
97
|
+
}
|
|
98
|
+
get dependencies() {
|
|
99
|
+
throw new UnsupportedOperationError('dependencies keyword from Validation vocabulary has been renamed to dependentSchemas.');
|
|
100
|
+
}
|
|
101
|
+
set dependencies(dependencies) {
|
|
102
|
+
throw new UnsupportedOperationError('dependencies keyword from Validation vocabulary has been renamed to dependentSchemas.');
|
|
103
|
+
}
|
|
104
|
+
get items() {
|
|
105
|
+
return this.get('items');
|
|
106
|
+
}
|
|
107
|
+
set items(items) {
|
|
108
|
+
this.set('items', items);
|
|
109
|
+
}
|
|
110
|
+
get containsProp() {
|
|
111
|
+
return this.get('contains');
|
|
112
|
+
}
|
|
113
|
+
set containsProp(containsProp) {
|
|
114
|
+
this.set('contains', containsProp);
|
|
115
|
+
}
|
|
116
|
+
get additionalProperties() {
|
|
117
|
+
return this.get('additionalProperties');
|
|
118
|
+
}
|
|
119
|
+
set additionalProperties(additionalProperties) {
|
|
120
|
+
this.set('additionalProperties', additionalProperties);
|
|
121
|
+
}
|
|
122
|
+
get additionalItems() {
|
|
123
|
+
return this.get('additionalItems');
|
|
124
|
+
}
|
|
125
|
+
set additionalItems(additionalItems) {
|
|
126
|
+
this.set('additionalItems', additionalItems);
|
|
127
|
+
}
|
|
128
|
+
get propertyNames() {
|
|
129
|
+
return this.get('propertyNames');
|
|
130
|
+
}
|
|
131
|
+
set propertyNames(propertyNames) {
|
|
132
|
+
this.set('propertyNames', propertyNames);
|
|
133
|
+
}
|
|
134
|
+
get unevaluatedItems() {
|
|
135
|
+
return this.get('unevaluatedItems');
|
|
136
|
+
}
|
|
137
|
+
set unevaluatedItems(unevaluatedItems) {
|
|
138
|
+
this.set('unevaluatedItems', unevaluatedItems);
|
|
139
|
+
}
|
|
140
|
+
get unevaluatedProperties() {
|
|
141
|
+
return this.get('unevaluatedProperties');
|
|
142
|
+
}
|
|
143
|
+
set unevaluatedProperties(unevaluatedProperties) {
|
|
144
|
+
this.set('unevaluatedProperties', unevaluatedProperties);
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* Validation vocabulary
|
|
149
|
+
*
|
|
150
|
+
* URI: https://json-schema.org/draft/2019-09/json-schema-validation#rfc.section.6
|
|
151
|
+
*/
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* Validation Keywords for Arrays
|
|
155
|
+
*
|
|
156
|
+
* URI: https://json-schema.org/draft/2019-09/draft-handrews-json-schema-validation-02#rfc.section.6.4
|
|
157
|
+
*/
|
|
158
|
+
|
|
159
|
+
get maxContains() {
|
|
160
|
+
return this.get('maxContains');
|
|
161
|
+
}
|
|
162
|
+
set maxContains(maxContains) {
|
|
163
|
+
this.set('maxContains', maxContains);
|
|
164
|
+
}
|
|
165
|
+
get minContains() {
|
|
166
|
+
return this.get('minContains');
|
|
167
|
+
}
|
|
168
|
+
set minContains(minContains) {
|
|
169
|
+
this.set('minContains', minContains);
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
/**
|
|
173
|
+
* Validation Keywords for Objects
|
|
174
|
+
*
|
|
175
|
+
* URI: https://json-schema.org/draft/2019-09/draft-handrews-json-schema-validation-02#rfc.section.6.5
|
|
176
|
+
*/
|
|
177
|
+
|
|
178
|
+
get dependentRequired() {
|
|
179
|
+
return this.get('dependentRequired');
|
|
180
|
+
}
|
|
181
|
+
set dependentRequired(dependentRequired) {
|
|
182
|
+
this.set('dependentRequired', dependentRequired);
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
/**
|
|
186
|
+
* Vocabulary for Basic Meta-Data Annotations
|
|
187
|
+
*
|
|
188
|
+
* URI: https://json-schema.org/draft/2019-09/vocab/meta-data
|
|
189
|
+
*/
|
|
190
|
+
|
|
191
|
+
get deprecated() {
|
|
192
|
+
return this.get('deprecated');
|
|
193
|
+
}
|
|
194
|
+
set deprecated(deprecated) {
|
|
195
|
+
this.set('deprecated', deprecated);
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
/**
|
|
199
|
+
* Vocabulary for the Contents of String-Encoded Data
|
|
200
|
+
*
|
|
201
|
+
* URI: https://json-schema.org/draft/2019-09/vocab/content
|
|
202
|
+
*/
|
|
203
|
+
|
|
204
|
+
get contentSchema() {
|
|
205
|
+
return this.get('contentSchema');
|
|
206
|
+
}
|
|
207
|
+
set contentSchema(contentSchema) {
|
|
208
|
+
this.set('contentSchema', contentSchema);
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
export default JSONSchema;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.default = void 0;
|
|
5
|
+
var _apidomNsJsonSchemaDraft = require("@speclynx/apidom-ns-json-schema-draft-7");
|
|
6
|
+
/**
|
|
7
|
+
* URI: https://json-schema.org/draft/2019-09/draft-handrews-json-schema-hyperschema-02#rfc.section.6
|
|
8
|
+
* @public
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
class LinkDescription extends _apidomNsJsonSchemaDraft.LinkDescriptionElement {
|
|
12
|
+
/**
|
|
13
|
+
* Link Target Attributes.
|
|
14
|
+
*
|
|
15
|
+
* URI: https://json-schema.org/draft/2019-09/draft-handrews-json-schema-hyperschema-02#rfc.section.6.5
|
|
16
|
+
*/
|
|
17
|
+
get targetSchema() {
|
|
18
|
+
return this.get('targetSchema');
|
|
19
|
+
}
|
|
20
|
+
set targetSchema(targetSchema) {
|
|
21
|
+
this.set('targetSchema', targetSchema);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Link Input.
|
|
26
|
+
*
|
|
27
|
+
* URI: https://json-schema.org/draft/2019-09/draft-handrews-json-schema-hyperschema-02#input
|
|
28
|
+
*/
|
|
29
|
+
get hrefSchema() {
|
|
30
|
+
return this.get('hrefSchema');
|
|
31
|
+
}
|
|
32
|
+
set hrefSchema(hrefSchema) {
|
|
33
|
+
this.set('hrefSchema', hrefSchema);
|
|
34
|
+
}
|
|
35
|
+
get headerSchema() {
|
|
36
|
+
return this.get('headerSchema');
|
|
37
|
+
}
|
|
38
|
+
set headerSchema(headerSchema) {
|
|
39
|
+
this.set('headerSchema', headerSchema);
|
|
40
|
+
}
|
|
41
|
+
get submissionSchema() {
|
|
42
|
+
return this.get('submissionSchema');
|
|
43
|
+
}
|
|
44
|
+
set submissionSchema(submissionSchema) {
|
|
45
|
+
this.set('submissionSchema', submissionSchema);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
var _default = exports.default = LinkDescription;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { LinkDescriptionElement } from '@speclynx/apidom-ns-json-schema-draft-7';
|
|
2
|
+
/**
|
|
3
|
+
* URI: https://json-schema.org/draft/2019-09/draft-handrews-json-schema-hyperschema-02#rfc.section.6
|
|
4
|
+
* @public
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
class LinkDescription extends LinkDescriptionElement {
|
|
8
|
+
/**
|
|
9
|
+
* Link Target Attributes.
|
|
10
|
+
*
|
|
11
|
+
* URI: https://json-schema.org/draft/2019-09/draft-handrews-json-schema-hyperschema-02#rfc.section.6.5
|
|
12
|
+
*/
|
|
13
|
+
get targetSchema() {
|
|
14
|
+
return this.get('targetSchema');
|
|
15
|
+
}
|
|
16
|
+
set targetSchema(targetSchema) {
|
|
17
|
+
this.set('targetSchema', targetSchema);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Link Input.
|
|
22
|
+
*
|
|
23
|
+
* URI: https://json-schema.org/draft/2019-09/draft-handrews-json-schema-hyperschema-02#input
|
|
24
|
+
*/
|
|
25
|
+
get hrefSchema() {
|
|
26
|
+
return this.get('hrefSchema');
|
|
27
|
+
}
|
|
28
|
+
set hrefSchema(hrefSchema) {
|
|
29
|
+
this.set('hrefSchema', hrefSchema);
|
|
30
|
+
}
|
|
31
|
+
get headerSchema() {
|
|
32
|
+
return this.get('headerSchema');
|
|
33
|
+
}
|
|
34
|
+
set headerSchema(headerSchema) {
|
|
35
|
+
this.set('headerSchema', headerSchema);
|
|
36
|
+
}
|
|
37
|
+
get submissionSchema() {
|
|
38
|
+
return this.get('submissionSchema');
|
|
39
|
+
}
|
|
40
|
+
set submissionSchema(submissionSchema) {
|
|
41
|
+
this.set('submissionSchema', submissionSchema);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
export default LinkDescription;
|
package/src/index.cjs
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
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.specificationObj = exports.refractorPluginReplaceEmptyElement = exports.refract = exports.mediaTypes = exports.keyMap = exports.isStringElement = exports.isRefElement = exports.isObjectElement = exports.isNumberElement = exports.isNullElement = exports.isMemberElement = exports.isLinkElement = exports.isLinkDescriptionElement = exports.isJSONSchemaElement = exports.isElement = exports.isBooleanElement = exports.isArrayElement = exports.getNodeType = exports.default = exports.createRefractor = exports.Visitor = exports.SpecificationVisitor = exports.PropertiesVisitor = exports.PatternedFieldsVisitor = exports.PatternPropertiesVisitor = exports.ParentSchemaAwareVisitor = exports.OneOfVisitor = exports.MapVisitor = exports.LinkDescriptionVisitor = exports.LinkDescriptionElement = exports.JSONSchemaVisitor = exports.JSONSchemaElement = exports.JSONSchema201909MediaTypes = exports.ItemsVisitor = exports.FixedFieldsVisitor = exports.FallbackVisitor = exports.DependentSchemasVisitor = exports.DependentRequiredVisitor = exports.AnyOfVisitor = exports.AlternatingVisitor = exports.AllOfVisitor = exports.$vocabularyVisitor = exports.$refVisitor = exports.$defsVisitor = void 0;
|
|
7
|
+
var _apidomCore = require("@speclynx/apidom-core");
|
|
8
|
+
exports.isRefElement = _apidomCore.isRefElement;
|
|
9
|
+
exports.isLinkElement = _apidomCore.isLinkElement;
|
|
10
|
+
exports.isMemberElement = _apidomCore.isMemberElement;
|
|
11
|
+
exports.isObjectElement = _apidomCore.isObjectElement;
|
|
12
|
+
exports.isArrayElement = _apidomCore.isArrayElement;
|
|
13
|
+
exports.isBooleanElement = _apidomCore.isBooleanElement;
|
|
14
|
+
exports.isNullElement = _apidomCore.isNullElement;
|
|
15
|
+
exports.isElement = _apidomCore.isElement;
|
|
16
|
+
exports.isNumberElement = _apidomCore.isNumberElement;
|
|
17
|
+
exports.isStringElement = _apidomCore.isStringElement;
|
|
18
|
+
var _mediaTypes = _interopRequireWildcard(require("./media-types.cjs"));
|
|
19
|
+
exports.mediaTypes = _mediaTypes.default;
|
|
20
|
+
exports.JSONSchema201909MediaTypes = _mediaTypes.JSONSchema201909MediaTypes;
|
|
21
|
+
var _namespace = _interopRequireDefault(require("./namespace.cjs"));
|
|
22
|
+
exports.default = _namespace.default;
|
|
23
|
+
var _replaceEmptyElement = _interopRequireDefault(require("./refractor/plugins/replace-empty-element.cjs"));
|
|
24
|
+
exports.refractorPluginReplaceEmptyElement = _replaceEmptyElement.default;
|
|
25
|
+
var _index = _interopRequireWildcard(require("./refractor/index.cjs"));
|
|
26
|
+
exports.refract = _index.default;
|
|
27
|
+
exports.createRefractor = _index.createRefractor;
|
|
28
|
+
var _specification = _interopRequireDefault(require("./refractor/specification.cjs"));
|
|
29
|
+
exports.specificationObj = _specification.default;
|
|
30
|
+
var _predicates = require("./predicates.cjs");
|
|
31
|
+
exports.isJSONSchemaElement = _predicates.isJSONSchemaElement;
|
|
32
|
+
exports.isLinkDescriptionElement = _predicates.isLinkDescriptionElement;
|
|
33
|
+
var _apidomNsJsonSchemaDraft = require("@speclynx/apidom-ns-json-schema-draft-7");
|
|
34
|
+
exports.SpecificationVisitor = _apidomNsJsonSchemaDraft.SpecificationVisitor;
|
|
35
|
+
exports.FallbackVisitor = _apidomNsJsonSchemaDraft.FallbackVisitor;
|
|
36
|
+
exports.FixedFieldsVisitor = _apidomNsJsonSchemaDraft.FixedFieldsVisitor;
|
|
37
|
+
exports.PatternedFieldsVisitor = _apidomNsJsonSchemaDraft.PatternedFieldsVisitor;
|
|
38
|
+
exports.MapVisitor = _apidomNsJsonSchemaDraft.MapVisitor;
|
|
39
|
+
exports.AlternatingVisitor = _apidomNsJsonSchemaDraft.AlternatingVisitor;
|
|
40
|
+
exports.ParentSchemaAwareVisitor = _apidomNsJsonSchemaDraft.ParentSchemaAwareVisitor;
|
|
41
|
+
exports.Visitor = _apidomNsJsonSchemaDraft.Visitor;
|
|
42
|
+
var _index2 = _interopRequireDefault(require("./refractor/visitors/json-schema/index.cjs"));
|
|
43
|
+
exports.JSONSchemaVisitor = _index2.default;
|
|
44
|
+
var _index3 = _interopRequireDefault(require("./refractor/visitors/json-schema/link-description/index.cjs"));
|
|
45
|
+
exports.LinkDescriptionVisitor = _index3.default;
|
|
46
|
+
var _$defsVisitor = _interopRequireDefault(require("./refractor/visitors/json-schema/$defsVisitor.cjs"));
|
|
47
|
+
exports.$defsVisitor = _$defsVisitor.default;
|
|
48
|
+
var _$refVisitor = _interopRequireDefault(require("./refractor/visitors/json-schema/$refVisitor.cjs"));
|
|
49
|
+
exports.$refVisitor = _$refVisitor.default;
|
|
50
|
+
var _$vocabularyVisitor = _interopRequireDefault(require("./refractor/visitors/json-schema/$vocabularyVisitor.cjs"));
|
|
51
|
+
exports.$vocabularyVisitor = _$vocabularyVisitor.default;
|
|
52
|
+
var _AllOfVisitor = _interopRequireDefault(require("./refractor/visitors/json-schema/AllOfVisitor.cjs"));
|
|
53
|
+
exports.AllOfVisitor = _AllOfVisitor.default;
|
|
54
|
+
var _AnyOfVisitor = _interopRequireDefault(require("./refractor/visitors/json-schema/AnyOfVisitor.cjs"));
|
|
55
|
+
exports.AnyOfVisitor = _AnyOfVisitor.default;
|
|
56
|
+
var _DependentRequiredVisitor = _interopRequireDefault(require("./refractor/visitors/json-schema/DependentRequiredVisitor.cjs"));
|
|
57
|
+
exports.DependentRequiredVisitor = _DependentRequiredVisitor.default;
|
|
58
|
+
var _DependentSchemasVisitor = _interopRequireDefault(require("./refractor/visitors/json-schema/DependentSchemasVisitor.cjs"));
|
|
59
|
+
exports.DependentSchemasVisitor = _DependentSchemasVisitor.default;
|
|
60
|
+
var _ItemsVisitor = _interopRequireDefault(require("./refractor/visitors/json-schema/ItemsVisitor.cjs"));
|
|
61
|
+
exports.ItemsVisitor = _ItemsVisitor.default;
|
|
62
|
+
var _OneOfVisitor = _interopRequireDefault(require("./refractor/visitors/json-schema/OneOfVisitor.cjs"));
|
|
63
|
+
exports.OneOfVisitor = _OneOfVisitor.default;
|
|
64
|
+
var _PatternPropertiesVisitor = _interopRequireDefault(require("./refractor/visitors/json-schema/PatternPropertiesVisitor.cjs"));
|
|
65
|
+
exports.PatternPropertiesVisitor = _PatternPropertiesVisitor.default;
|
|
66
|
+
var _PropertiesVisitor = _interopRequireDefault(require("./refractor/visitors/json-schema/PropertiesVisitor.cjs"));
|
|
67
|
+
exports.PropertiesVisitor = _PropertiesVisitor.default;
|
|
68
|
+
var _visitor = require("./traversal/visitor.cjs");
|
|
69
|
+
exports.keyMap = _visitor.keyMap;
|
|
70
|
+
exports.getNodeType = _visitor.getNodeType;
|
|
71
|
+
var _registration = require("./refractor/registration.cjs");
|
|
72
|
+
exports.JSONSchemaElement = _registration.JSONSchemaElement;
|
|
73
|
+
exports.LinkDescriptionElement = _registration.LinkDescriptionElement;
|
package/src/index.mjs
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export { isRefElement, isLinkElement, isMemberElement, isObjectElement, isArrayElement, isBooleanElement, isNullElement, isElement, isNumberElement, isStringElement } from '@speclynx/apidom-core';
|
|
2
|
+
export { default as mediaTypes, JSONSchema201909MediaTypes } from "./media-types.mjs";
|
|
3
|
+
export { default } from "./namespace.mjs";
|
|
4
|
+
export { default as refractorPluginReplaceEmptyElement } from "./refractor/plugins/replace-empty-element.mjs";
|
|
5
|
+
export { default as refract, createRefractor } from "./refractor/index.mjs";
|
|
6
|
+
export { default as specificationObj } from "./refractor/specification.mjs";
|
|
7
|
+
export { isJSONSchemaElement, isLinkDescriptionElement } from "./predicates.mjs";
|
|
8
|
+
export { SpecificationVisitor, FallbackVisitor, FixedFieldsVisitor, PatternedFieldsVisitor, MapVisitor, AlternatingVisitor, ParentSchemaAwareVisitor, Visitor } from '@speclynx/apidom-ns-json-schema-draft-7';
|
|
9
|
+
export { default as JSONSchemaVisitor } from "./refractor/visitors/json-schema/index.mjs";
|
|
10
|
+
export { default as LinkDescriptionVisitor } from "./refractor/visitors/json-schema/link-description/index.mjs";
|
|
11
|
+
export { default as $defsVisitor } from "./refractor/visitors/json-schema/$defsVisitor.mjs";
|
|
12
|
+
export { default as $refVisitor } from "./refractor/visitors/json-schema/$refVisitor.mjs";
|
|
13
|
+
export { default as $vocabularyVisitor } from "./refractor/visitors/json-schema/$vocabularyVisitor.mjs";
|
|
14
|
+
export { default as AllOfVisitor } from "./refractor/visitors/json-schema/AllOfVisitor.mjs";
|
|
15
|
+
export { default as AnyOfVisitor } from "./refractor/visitors/json-schema/AnyOfVisitor.mjs";
|
|
16
|
+
export { default as DependentRequiredVisitor } from "./refractor/visitors/json-schema/DependentRequiredVisitor.mjs";
|
|
17
|
+
export { default as DependentSchemasVisitor } from "./refractor/visitors/json-schema/DependentSchemasVisitor.mjs";
|
|
18
|
+
export { default as ItemsVisitor } from "./refractor/visitors/json-schema/ItemsVisitor.mjs";
|
|
19
|
+
export { default as OneOfVisitor } from "./refractor/visitors/json-schema/OneOfVisitor.mjs";
|
|
20
|
+
export { default as PatternPropertiesVisitor } from "./refractor/visitors/json-schema/PatternPropertiesVisitor.mjs";
|
|
21
|
+
export { default as PropertiesVisitor } from "./refractor/visitors/json-schema/PropertiesVisitor.mjs";
|
|
22
|
+
export { keyMap, getNodeType } from "./traversal/visitor.mjs";
|
|
23
|
+
/**
|
|
24
|
+
* JSON Schema 2019-09 specification elements.
|
|
25
|
+
*/
|
|
26
|
+
export { JSONSchemaElement, LinkDescriptionElement } from "./refractor/registration.mjs";
|