@speclynx/apidom-ns-json-schema-draft-4 3.2.0 → 4.0.0

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.
Files changed (85) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dist/apidom-ns-json-schema-draft-4.browser.js +24 -20
  3. package/package.json +5 -5
  4. package/src/elements/JSONReference.cjs +0 -29
  5. package/src/elements/JSONReference.mjs +0 -25
  6. package/src/elements/JSONSchema.cjs +0 -296
  7. package/src/elements/JSONSchema.mjs +0 -292
  8. package/src/elements/LinkDescription.cjs +0 -65
  9. package/src/elements/LinkDescription.mjs +0 -61
  10. package/src/elements/Media.cjs +0 -29
  11. package/src/elements/Media.mjs +0 -25
  12. package/src/index.cjs +0 -69
  13. package/src/index.mjs +0 -23
  14. package/src/media-types.cjs +0 -34
  15. package/src/media-types.mjs +0 -30
  16. package/src/namespace.cjs +0 -25
  17. package/src/namespace.mjs +0 -20
  18. package/src/predicates.cjs +0 -32
  19. package/src/predicates.mjs +0 -23
  20. package/src/refractor/index.cjs +0 -96
  21. package/src/refractor/index.mjs +0 -85
  22. package/src/refractor/inspect.cjs +0 -55
  23. package/src/refractor/inspect.mjs +0 -47
  24. package/src/refractor/plugins/replace-empty-element.cjs +0 -208
  25. package/src/refractor/plugins/replace-empty-element.mjs +0 -202
  26. package/src/refractor/predicates.cjs +0 -16
  27. package/src/refractor/predicates.mjs +0 -12
  28. package/src/refractor/specification.cjs +0 -193
  29. package/src/refractor/specification.mjs +0 -188
  30. package/src/refractor/toolbox.cjs +0 -28
  31. package/src/refractor/toolbox.mjs +0 -21
  32. package/src/refractor/visitors/FallbackVisitor.cjs +0 -25
  33. package/src/refractor/visitors/FallbackVisitor.mjs +0 -19
  34. package/src/refractor/visitors/SpecificationVisitor.cjs +0 -75
  35. package/src/refractor/visitors/SpecificationVisitor.mjs +0 -69
  36. package/src/refractor/visitors/Visitor.cjs +0 -36
  37. package/src/refractor/visitors/Visitor.mjs +0 -33
  38. package/src/refractor/visitors/generics/AlternatingVisitor.cjs +0 -42
  39. package/src/refractor/visitors/generics/AlternatingVisitor.mjs +0 -35
  40. package/src/refractor/visitors/generics/FixedFieldsVisitor.cjs +0 -57
  41. package/src/refractor/visitors/generics/FixedFieldsVisitor.mjs +0 -50
  42. package/src/refractor/visitors/generics/MapVisitor.cjs +0 -21
  43. package/src/refractor/visitors/generics/MapVisitor.mjs +0 -15
  44. package/src/refractor/visitors/generics/PatternedFieldsVisitor.cjs +0 -58
  45. package/src/refractor/visitors/generics/PatternedFieldsVisitor.mjs +0 -52
  46. package/src/refractor/visitors/json-schema/AllOfVisitor.cjs +0 -32
  47. package/src/refractor/visitors/json-schema/AllOfVisitor.mjs +0 -27
  48. package/src/refractor/visitors/json-schema/AnyOfVisitor.cjs +0 -32
  49. package/src/refractor/visitors/json-schema/AnyOfVisitor.mjs +0 -27
  50. package/src/refractor/visitors/json-schema/DefinitionsVisitor.cjs +0 -23
  51. package/src/refractor/visitors/json-schema/DefinitionsVisitor.mjs +0 -18
  52. package/src/refractor/visitors/json-schema/DependenciesVisitor.cjs +0 -23
  53. package/src/refractor/visitors/json-schema/DependenciesVisitor.mjs +0 -18
  54. package/src/refractor/visitors/json-schema/EnumVisitor.cjs +0 -16
  55. package/src/refractor/visitors/json-schema/EnumVisitor.mjs +0 -11
  56. package/src/refractor/visitors/json-schema/ItemsVisitor.cjs +0 -35
  57. package/src/refractor/visitors/json-schema/ItemsVisitor.mjs +0 -30
  58. package/src/refractor/visitors/json-schema/JSONSchemaOrJSONReferenceVisitor.cjs +0 -24
  59. package/src/refractor/visitors/json-schema/JSONSchemaOrJSONReferenceVisitor.mjs +0 -19
  60. package/src/refractor/visitors/json-schema/LinksVisitor.cjs +0 -30
  61. package/src/refractor/visitors/json-schema/LinksVisitor.mjs +0 -25
  62. package/src/refractor/visitors/json-schema/OneOfVisitor.cjs +0 -32
  63. package/src/refractor/visitors/json-schema/OneOfVisitor.mjs +0 -27
  64. package/src/refractor/visitors/json-schema/ParentSchemaAwareVisitor.cjs +0 -20
  65. package/src/refractor/visitors/json-schema/ParentSchemaAwareVisitor.mjs +0 -16
  66. package/src/refractor/visitors/json-schema/PatternPropertiesVisitor.cjs +0 -23
  67. package/src/refractor/visitors/json-schema/PatternPropertiesVisitor.mjs +0 -18
  68. package/src/refractor/visitors/json-schema/PropertiesVisitor.cjs +0 -23
  69. package/src/refractor/visitors/json-schema/PropertiesVisitor.mjs +0 -18
  70. package/src/refractor/visitors/json-schema/RequiredVisitor.cjs +0 -16
  71. package/src/refractor/visitors/json-schema/RequiredVisitor.mjs +0 -11
  72. package/src/refractor/visitors/json-schema/TypeVisitor.cjs +0 -20
  73. package/src/refractor/visitors/json-schema/TypeVisitor.mjs +0 -15
  74. package/src/refractor/visitors/json-schema/bases.cjs +0 -45
  75. package/src/refractor/visitors/json-schema/bases.mjs +0 -39
  76. package/src/refractor/visitors/json-schema/index.cjs +0 -65
  77. package/src/refractor/visitors/json-schema/index.mjs +0 -59
  78. package/src/refractor/visitors/json-schema/json-reference/$RefVisitor.cjs +0 -16
  79. package/src/refractor/visitors/json-schema/json-reference/$RefVisitor.mjs +0 -11
  80. package/src/refractor/visitors/json-schema/json-reference/index.cjs +0 -33
  81. package/src/refractor/visitors/json-schema/json-reference/index.mjs +0 -27
  82. package/src/refractor/visitors/json-schema/link-description/index.cjs +0 -23
  83. package/src/refractor/visitors/json-schema/link-description/index.mjs +0 -17
  84. package/src/refractor/visitors/json-schema/media/index.cjs +0 -23
  85. package/src/refractor/visitors/json-schema/media/index.mjs +0 -17
package/CHANGELOG.md CHANGED
@@ -3,6 +3,22 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [4.0.0](https://github.com/speclynx/apidom/compare/v3.2.1...v4.0.0) (2026-03-11)
7
+
8
+ ### Features
9
+
10
+ - **traverse:** all traverse operations work on Path and not Element ([#153](https://github.com/speclynx/apidom/issues/153)) ([67d244c](https://github.com/speclynx/apidom/commit/67d244cfd3e77f6a9db704cede50ba8e45d10b11))
11
+
12
+ ### BREAKING CHANGES
13
+
14
+ - **traverse:** This is a breaking change as operation callbacks
15
+ now accept Path instead of Element. By accepting Path, full
16
+ context of traversal is exposed to consumer instead of just Element.
17
+
18
+ ## [3.2.1](https://github.com/speclynx/apidom/compare/v3.2.0...v3.2.1) (2026-03-09)
19
+
20
+ **Note:** Version bump only for package @speclynx/apidom-ns-json-schema-draft-4
21
+
6
22
  # [3.2.0](https://github.com/speclynx/apidom/compare/v3.1.0...v3.2.0) (2026-03-08)
7
23
 
8
24
  ### Features
@@ -21365,7 +21365,9 @@ class Path {
21365
21365
  *
21366
21366
  * @example
21367
21367
  * // For a path to $.paths['/pets'].get in an OpenAPI document:
21368
+ * ```
21368
21369
  * path.getPathKeys(); // => ['paths', '/pets', 'get']
21370
+ * ```
21369
21371
  */
21370
21372
  getPathKeys() {
21371
21373
  const keys = [];
@@ -21400,18 +21402,22 @@ class Path {
21400
21402
  * or Normalized JSONPath like "$['paths']['/pets']['get']['responses']['200']"
21401
21403
  *
21402
21404
  * @example
21405
+ * ```
21403
21406
  * // JSON Pointer examples:
21404
21407
  * path.formatPath(); // "" (root)
21405
21408
  * path.formatPath(); // "/info"
21406
21409
  * path.formatPath(); // "/paths/~1pets/get"
21407
21410
  * path.formatPath(); // "/paths/~1users~1{id}/parameters/0"
21411
+ * ```
21408
21412
  *
21409
21413
  * @example
21414
+ * ```
21410
21415
  * // JSONPath examples:
21411
21416
  * path.formatPath('jsonpath'); // "$" (root)
21412
21417
  * path.formatPath('jsonpath'); // "$['info']"
21413
21418
  * path.formatPath('jsonpath'); // "$['paths']['/pets']['get']"
21414
21419
  * path.formatPath('jsonpath'); // "$['paths']['/users/{id}']['parameters'][0]"
21420
+ * ```
21415
21421
  */
21416
21422
  formatPath(pathFormat = 'jsonpointer') {
21417
21423
  const parts = this.getPathKeys();
@@ -21619,15 +21625,15 @@ __webpack_require__.r(__webpack_exports__);
21619
21625
  /* harmony import */ var _traversal_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2078);
21620
21626
 
21621
21627
  /**
21622
- * Finds all elements matching the predicate.
21628
+ * Finds all paths whose elements match the predicate.
21623
21629
  * @public
21624
21630
  */
21625
21631
  const filter = (element, predicate) => {
21626
21632
  const result = [];
21627
21633
  (0,_traversal_mjs__WEBPACK_IMPORTED_MODULE_0__.traverse)(element, {
21628
21634
  enter(path) {
21629
- if (predicate(path.node)) {
21630
- result.push(path.node);
21635
+ if (predicate(path)) {
21636
+ result.push(path);
21631
21637
  }
21632
21638
  }
21633
21639
  });
@@ -21652,7 +21658,7 @@ __webpack_require__.r(__webpack_exports__);
21652
21658
  * @public
21653
21659
  */
21654
21660
  /**
21655
- * Finds the most inner node at the given offset.
21661
+ * Finds the path of the most inner node at the given offset.
21656
21662
  * If includeRightBound is set, also finds nodes that end at the given offset.
21657
21663
  * @public
21658
21664
  */
@@ -21677,7 +21683,7 @@ const findAtOffset = (element, options) => {
21677
21683
  const endOffset = node.endOffset;
21678
21684
  const isWithinOffsetRange = offset >= startOffset && (offset < endOffset || includeRightBound && offset <= endOffset);
21679
21685
  if (isWithinOffsetRange) {
21680
- result.push(node);
21686
+ result.push(path);
21681
21687
  return; // push to stack and dive in
21682
21688
  }
21683
21689
  path.skip(); // skip entire sub-tree
@@ -21699,15 +21705,15 @@ __webpack_require__.r(__webpack_exports__);
21699
21705
  /* harmony import */ var _traversal_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2078);
21700
21706
 
21701
21707
  /**
21702
- * Find first element that satisfies the provided predicate.
21708
+ * Finds first path whose element satisfies the provided predicate.
21703
21709
  * @public
21704
21710
  */
21705
21711
  const find = (element, predicate) => {
21706
21712
  let result;
21707
21713
  (0,_traversal_mjs__WEBPACK_IMPORTED_MODULE_0__.traverse)(element, {
21708
21714
  enter(path) {
21709
- if (predicate(path.node)) {
21710
- result = path.node;
21715
+ if (predicate(path)) {
21716
+ result = path;
21711
21717
  path.stop();
21712
21718
  }
21713
21719
  }
@@ -21725,9 +21731,7 @@ __webpack_require__.r(__webpack_exports__);
21725
21731
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
21726
21732
  /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
21727
21733
  /* harmony export */ });
21728
- /* harmony import */ var _speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5162);
21729
- /* harmony import */ var _traversal_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2078);
21730
-
21734
+ /* harmony import */ var _traversal_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2078);
21731
21735
 
21732
21736
  /**
21733
21737
  * @public
@@ -21736,7 +21740,7 @@ __webpack_require__.r(__webpack_exports__);
21736
21740
  * @public
21737
21741
  */
21738
21742
  /**
21739
- * Executes the callback on this element and all descendants.
21743
+ * Executes the callback on this element's path and all descendant paths.
21740
21744
  * @public
21741
21745
  */
21742
21746
  const forEach = (element, options) => {
@@ -21744,15 +21748,15 @@ const forEach = (element, options) => {
21744
21748
  let predicate;
21745
21749
  if (typeof options === 'function') {
21746
21750
  callback = options;
21747
- predicate = _speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_0__.isElement;
21751
+ predicate = () => true;
21748
21752
  } else {
21749
21753
  callback = options.callback ?? (() => {});
21750
- predicate = options.predicate ?? _speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_0__.isElement;
21754
+ predicate = options.predicate ?? (() => true);
21751
21755
  }
21752
- (0,_traversal_mjs__WEBPACK_IMPORTED_MODULE_1__.traverse)(element, {
21756
+ (0,_traversal_mjs__WEBPACK_IMPORTED_MODULE_0__.traverse)(element, {
21753
21757
  enter(path) {
21754
- if (predicate(path.node)) {
21755
- callback(path.node);
21758
+ if (predicate(path)) {
21759
+ callback(path);
21756
21760
  }
21757
21761
  }
21758
21762
  });
@@ -21799,11 +21803,11 @@ __webpack_require__.r(__webpack_exports__);
21799
21803
  /* harmony import */ var _filter_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5247);
21800
21804
 
21801
21805
  /**
21802
- * Complement of filter. Finds all elements NOT matching the predicate.
21806
+ * Complement of filter. Finds all paths whose elements do NOT match the predicate.
21803
21807
  * @public
21804
21808
  */
21805
21809
  const reject = (element, predicate) => {
21806
- return (0,_filter_mjs__WEBPACK_IMPORTED_MODULE_0__["default"])(element, el => !predicate(el));
21810
+ return (0,_filter_mjs__WEBPACK_IMPORTED_MODULE_0__["default"])(element, path => !predicate(path));
21807
21811
  };
21808
21812
  /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (reject);
21809
21813
 
@@ -21819,7 +21823,7 @@ __webpack_require__.r(__webpack_exports__);
21819
21823
  /* harmony import */ var _find_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4860);
21820
21824
 
21821
21825
  /**
21822
- * Tests whether at least one element passes the predicate.
21826
+ * Tests whether at least one path's element passes the predicate.
21823
21827
  * @public
21824
21828
  */
21825
21829
  const some = (element, predicate) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@speclynx/apidom-ns-json-schema-draft-4",
3
- "version": "3.2.0",
3
+ "version": "4.0.0",
4
4
  "description": "JSON Schema Draft 4 namespace for ApiDOM.",
5
5
  "keywords": [
6
6
  "apidom",
@@ -59,9 +59,9 @@
59
59
  "license": "Apache-2.0",
60
60
  "dependencies": {
61
61
  "@babel/runtime-corejs3": "^7.28.4",
62
- "@speclynx/apidom-core": "3.2.0",
63
- "@speclynx/apidom-datamodel": "3.2.0",
64
- "@speclynx/apidom-traverse": "3.2.0",
62
+ "@speclynx/apidom-core": "4.0.0",
63
+ "@speclynx/apidom-datamodel": "4.0.0",
64
+ "@speclynx/apidom-traverse": "4.0.0",
65
65
  "ramda": "~0.32.0",
66
66
  "ramda-adjunct": "^6.0.0",
67
67
  "ts-mixer": "^6.0.4"
@@ -76,5 +76,5 @@
76
76
  "README.md",
77
77
  "CHANGELOG.md"
78
78
  ],
79
- "gitHead": "eeb2f01cd34fb0a95617f02bc1b6683aefc028f2"
79
+ "gitHead": "384ff82a1bb68d015fd6801de641898b4b582876"
80
80
  }
@@ -1,29 +0,0 @@
1
- "use strict";
2
-
3
- exports.__esModule = true;
4
- exports.default = void 0;
5
- var _apidomDatamodel = require("@speclynx/apidom-datamodel");
6
- /**
7
- * In Draft 4, $ref behaves a little differently. When an object contains a $ref property,
8
- * the object is considered a reference, not a schema. Therefore, any other properties you put in that object will
9
- * not be treated as JSON Schema keywords and will be ignored by the validator.
10
- * $ref can only be used where a schema is expected.
11
- *
12
- * URI: https://json-schema.org/understanding-json-schema/structuring.html?highlight=ref#id18
13
- * @public
14
- */
15
-
16
- class JSONReference extends _apidomDatamodel.ObjectElement {
17
- constructor(content, meta, attributes) {
18
- super(content, meta, attributes);
19
- this.element = 'JSONReference';
20
- this.classes.push('json-reference');
21
- }
22
- get $ref() {
23
- return this.get('$ref');
24
- }
25
- set $ref($ref) {
26
- this.set('$ref', $ref);
27
- }
28
- }
29
- var _default = exports.default = JSONReference;
@@ -1,25 +0,0 @@
1
- import { ObjectElement } from '@speclynx/apidom-datamodel';
2
- /**
3
- * In Draft 4, $ref behaves a little differently. When an object contains a $ref property,
4
- * the object is considered a reference, not a schema. Therefore, any other properties you put in that object will
5
- * not be treated as JSON Schema keywords and will be ignored by the validator.
6
- * $ref can only be used where a schema is expected.
7
- *
8
- * URI: https://json-schema.org/understanding-json-schema/structuring.html?highlight=ref#id18
9
- * @public
10
- */
11
-
12
- class JSONReference extends ObjectElement {
13
- constructor(content, meta, attributes) {
14
- super(content, meta, attributes);
15
- this.element = 'JSONReference';
16
- this.classes.push('json-reference');
17
- }
18
- get $ref() {
19
- return this.get('$ref');
20
- }
21
- set $ref($ref) {
22
- this.set('$ref', $ref);
23
- }
24
- }
25
- export default JSONReference;
@@ -1,296 +0,0 @@
1
- "use strict";
2
-
3
- exports.__esModule = true;
4
- exports.default = void 0;
5
- var _apidomDatamodel = require("@speclynx/apidom-datamodel");
6
- /**
7
- * @public
8
- */
9
- class JSONSchema extends _apidomDatamodel.ObjectElement {
10
- constructor(content, meta, attributes) {
11
- super(content, meta, attributes);
12
- this.element = 'JSONSchemaDraft4';
13
- }
14
-
15
- /**
16
- * Core vocabulary
17
- *
18
- * URI: https://tools.ietf.org/html/draft-wright-json-schema-00
19
- */
20
-
21
- get idField() {
22
- return this.get('id');
23
- }
24
- set idField(idField) {
25
- this.set('id', idField);
26
- }
27
- get $schema() {
28
- return this.get('$schema');
29
- }
30
- set $schema($schema) {
31
- this.set('$schema', $schema);
32
- }
33
-
34
- /**
35
- * Validation vocabulary
36
- *
37
- * URI: https://tools.ietf.org/html/draft-wright-json-schema-validation-00
38
- */
39
-
40
- /**
41
- * Validation keywords for numeric instances (number and integer)
42
- */
43
-
44
- get multipleOf() {
45
- return this.get('multipleOf');
46
- }
47
- set multipleOf(multipleOf) {
48
- this.set('multipleOf', multipleOf);
49
- }
50
- get maximum() {
51
- return this.get('maximum');
52
- }
53
- set maximum(maximum) {
54
- this.set('maximum', maximum);
55
- }
56
- get exclusiveMaximum() {
57
- return this.get('exclusiveMaximum');
58
- }
59
- set exclusiveMaximum(exclusiveMaximum) {
60
- this.set('exclusiveMaximum', exclusiveMaximum);
61
- }
62
- get minimum() {
63
- return this.get('minimum');
64
- }
65
- set minimum(minimum) {
66
- this.set('minimum', minimum);
67
- }
68
- get exclusiveMinimum() {
69
- return this.get('exclusiveMinimum');
70
- }
71
- set exclusiveMinimum(exclusiveMinimum) {
72
- this.set('exclusiveMinimum', exclusiveMinimum);
73
- }
74
-
75
- /**
76
- * Validation keywords for strings
77
- */
78
-
79
- get maxLength() {
80
- return this.get('maxLength');
81
- }
82
- set maxLength(maxLength) {
83
- this.set('maxLength', maxLength);
84
- }
85
- get minLength() {
86
- return this.get('minLength');
87
- }
88
- set minLength(minLength) {
89
- this.set('minLength', minLength);
90
- }
91
- get pattern() {
92
- return this.get('pattern');
93
- }
94
- set pattern(pattern) {
95
- this.set('pattern', pattern);
96
- }
97
-
98
- /**
99
- * Validation keywords for arrays
100
- */
101
-
102
- get additionalItems() {
103
- return this.get('additionalItems');
104
- }
105
- set additionalItems(additionalItems) {
106
- this.set('additionalItems', additionalItems);
107
- }
108
- get itemsField() {
109
- return this.get('items');
110
- }
111
- set itemsField(items) {
112
- this.set('items', items);
113
- }
114
- get maxItems() {
115
- return this.get('maxItems');
116
- }
117
- set maxItems(maxItems) {
118
- this.set('maxItems', maxItems);
119
- }
120
- get minItems() {
121
- return this.get('minItems');
122
- }
123
- set minItems(minItems) {
124
- this.set('minItems', minItems);
125
- }
126
- get uniqueItems() {
127
- return this.get('uniqueItems');
128
- }
129
- set uniqueItems(uniqueItems) {
130
- this.set('uniqueItems', uniqueItems);
131
- }
132
-
133
- /**
134
- * Validation keywords for objects
135
- */
136
-
137
- get maxProperties() {
138
- return this.get('maxProperties');
139
- }
140
- set maxProperties(maxProperties) {
141
- this.set('maxProperties', maxProperties);
142
- }
143
- get minProperties() {
144
- return this.get('minProperties');
145
- }
146
- set minProperties(minProperties) {
147
- this.set('minProperties', minProperties);
148
- }
149
- get required() {
150
- return this.get('required');
151
- }
152
- set required(required) {
153
- this.set('required', required);
154
- }
155
- get properties() {
156
- return this.get('properties');
157
- }
158
- set properties(properties) {
159
- this.set('properties', properties);
160
- }
161
- get additionalProperties() {
162
- return this.get('additionalProperties');
163
- }
164
- set additionalProperties(additionalProperties) {
165
- this.set('additionalProperties', additionalProperties);
166
- }
167
- get patternProperties() {
168
- return this.get('patternProperties');
169
- }
170
- set patternProperties(patternProperties) {
171
- this.set('patternProperties', patternProperties);
172
- }
173
- get dependencies() {
174
- return this.get('dependencies');
175
- }
176
- set dependencies(dependencies) {
177
- this.set('dependencies', dependencies);
178
- }
179
-
180
- /**
181
- * Validation keywords for any instance type
182
- */
183
-
184
- get enum() {
185
- return this.get('enum');
186
- }
187
- set enum(enumValue) {
188
- this.set('enum', enumValue);
189
- }
190
- get type() {
191
- return this.get('type');
192
- }
193
- set type(type) {
194
- this.set('type', type);
195
- }
196
- get allOf() {
197
- return this.get('allOf');
198
- }
199
- set allOf(allOf) {
200
- this.set('allOf', allOf);
201
- }
202
- get anyOf() {
203
- return this.get('anyOf');
204
- }
205
- set anyOf(anyOf) {
206
- this.set('anyOf', anyOf);
207
- }
208
- get oneOf() {
209
- return this.get('oneOf');
210
- }
211
- set oneOf(oneOf) {
212
- this.set('oneOf', oneOf);
213
- }
214
- get not() {
215
- return this.get('not');
216
- }
217
- set not(not) {
218
- this.set('not', not);
219
- }
220
- get definitions() {
221
- return this.get('definitions');
222
- }
223
- set definitions(definitions) {
224
- this.set('definitions', definitions);
225
- }
226
-
227
- /**
228
- * Metadata keywords
229
- *
230
- * URI: https://datatracker.ietf.org/doc/html/draft-wright-json-schema-validation-00#section-6
231
- */
232
-
233
- get title() {
234
- return this.get('title');
235
- }
236
- set title(title) {
237
- this.set('title', title);
238
- }
239
- get description() {
240
- return this.get('description');
241
- }
242
- set description(description) {
243
- this.set('description', description);
244
- }
245
- get default() {
246
- return this.get('default');
247
- }
248
- set default(defaultValue) {
249
- this.set('default', defaultValue);
250
- }
251
-
252
- /**
253
- * Semantic validation with "format"
254
- *
255
- * URI: https://datatracker.ietf.org/doc/html/draft-wright-json-schema-validation-00#section-7
256
- */
257
-
258
- get format() {
259
- return this.get('format');
260
- }
261
- set format(format) {
262
- this.set('format', format);
263
- }
264
-
265
- /**
266
- * JSON Hyper-Schema
267
- *
268
- * URI: https://datatracker.ietf.org/doc/html/draft-wright-json-schema-hyperschema-00
269
- */
270
-
271
- get base() {
272
- return this.get('base');
273
- }
274
- set base(base) {
275
- this.set('base', base);
276
- }
277
- get linksField() {
278
- return this.get('links');
279
- }
280
- set linksField(links) {
281
- this.set('links', links);
282
- }
283
- get media() {
284
- return this.get('media');
285
- }
286
- set media(media) {
287
- this.set('media', media);
288
- }
289
- get readOnly() {
290
- return this.get('readOnly');
291
- }
292
- set readOnly(readOnly) {
293
- this.set('readOnly', readOnly);
294
- }
295
- }
296
- var _default = exports.default = JSONSchema;