@swagger-api/apidom-ns-json-schema-draft-7 1.0.0-beta.6 → 1.0.0-beta.7

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@swagger-api/apidom-ns-json-schema-draft-7",
3
- "version": "1.0.0-beta.6",
3
+ "version": "1.0.0-beta.7",
4
4
  "description": "JSON Schema Draft 7 namespace for ApiDOM.",
5
5
  "publishConfig": {
6
6
  "access": "public",
@@ -42,9 +42,9 @@
42
42
  "license": "Apache-2.0",
43
43
  "dependencies": {
44
44
  "@babel/runtime-corejs3": "^7.20.7",
45
- "@swagger-api/apidom-core": "^1.0.0-beta.6",
46
- "@swagger-api/apidom-error": "^1.0.0-beta.6",
47
- "@swagger-api/apidom-ns-json-schema-draft-6": "^1.0.0-beta.6",
45
+ "@swagger-api/apidom-core": "^1.0.0-beta.7",
46
+ "@swagger-api/apidom-error": "^1.0.0-beta.7",
47
+ "@swagger-api/apidom-ns-json-schema-draft-6": "^1.0.0-beta.7",
48
48
  "@types/ramda": "~0.30.0",
49
49
  "ramda": "~0.30.0",
50
50
  "ramda-adjunct": "^5.0.0",
@@ -60,5 +60,5 @@
60
60
  "README.md",
61
61
  "CHANGELOG.md"
62
62
  ],
63
- "gitHead": "549d93b1c8313e4c667df01c708d65b6b9e41193"
63
+ "gitHead": "f0057bba46dc55369b7403cdaf565f44ad4a2267"
64
64
  }
@@ -33,6 +33,34 @@ class JSONSchema extends _apidomNsJsonSchemaDraft.JSONSchemaElement {
33
33
  * URI: https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01
34
34
  */
35
35
 
36
+ /**
37
+ * Validation keywords for arrays
38
+ */
39
+
40
+ get containsProp() {
41
+ return this.get('contains');
42
+ }
43
+ set containsProp(contains) {
44
+ this.set('contains', contains);
45
+ }
46
+ get items() {
47
+ return this.get('items');
48
+ }
49
+ set items(items) {
50
+ this.set('items', items);
51
+ }
52
+
53
+ /**
54
+ * Validation keywords for objects
55
+ */
56
+
57
+ get propertyNames() {
58
+ return this.get('propertyNames');
59
+ }
60
+ set propertyNames(propertyNames) {
61
+ this.set('propertyNames', propertyNames);
62
+ }
63
+
36
64
  /**
37
65
  * Keywords for Applying Subschemas Conditionally
38
66
  *
@@ -58,6 +86,19 @@ class JSONSchema extends _apidomNsJsonSchemaDraft.JSONSchemaElement {
58
86
  this.set('else', elseValue);
59
87
  }
60
88
 
89
+ /**
90
+ * Keywords for Applying Subschemas With Boolean Logic
91
+ *
92
+ * URI: https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.7
93
+ */
94
+
95
+ get not() {
96
+ return this.get('not');
97
+ }
98
+ set not(not) {
99
+ this.set('not', not);
100
+ }
101
+
61
102
  /**
62
103
  * String-Encoding Non-JSON Data
63
104
  *
@@ -30,6 +30,34 @@ class JSONSchema extends JSONSchemaElement {
30
30
  * URI: https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01
31
31
  */
32
32
 
33
+ /**
34
+ * Validation keywords for arrays
35
+ */
36
+
37
+ get containsProp() {
38
+ return this.get('contains');
39
+ }
40
+ set containsProp(contains) {
41
+ this.set('contains', contains);
42
+ }
43
+ get items() {
44
+ return this.get('items');
45
+ }
46
+ set items(items) {
47
+ this.set('items', items);
48
+ }
49
+
50
+ /**
51
+ * Validation keywords for objects
52
+ */
53
+
54
+ get propertyNames() {
55
+ return this.get('propertyNames');
56
+ }
57
+ set propertyNames(propertyNames) {
58
+ this.set('propertyNames', propertyNames);
59
+ }
60
+
33
61
  /**
34
62
  * Keywords for Applying Subschemas Conditionally
35
63
  *
@@ -55,6 +83,19 @@ class JSONSchema extends JSONSchemaElement {
55
83
  this.set('else', elseValue);
56
84
  }
57
85
 
86
+ /**
87
+ * Keywords for Applying Subschemas With Boolean Logic
88
+ *
89
+ * URI: https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.7
90
+ */
91
+
92
+ get not() {
93
+ return this.get('not');
94
+ }
95
+ set not(not) {
96
+ this.set('not', not);
97
+ }
98
+
58
99
  /**
59
100
  * String-Encoding Non-JSON Data
60
101
  *
@@ -56,6 +56,12 @@ class LinkDescription extends _apidomNsJsonSchemaDraft.LinkDescriptionElement {
56
56
  * URI: https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-01#section-6.5
57
57
  */
58
58
 
59
+ get targetSchema() {
60
+ return this.get('targetSchema');
61
+ }
62
+ set targetSchema(targetSchema) {
63
+ this.set('targetSchema', targetSchema);
64
+ }
59
65
  get mediaType() {
60
66
  throw new _apidomError.UnsupportedOperationError('mediaType keyword from Hyper-Schema vocabulary has been renamed to targetMediaType.');
61
67
  }
@@ -87,11 +93,37 @@ class LinkDescription extends _apidomNsJsonSchemaDraft.LinkDescriptionElement {
87
93
  this.set('$comment', $comment);
88
94
  }
89
95
 
96
+ /**
97
+ * Link Input.
98
+ *
99
+ * URI: https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-01#section-6.6
100
+ */
101
+
102
+ get hrefSchema() {
103
+ return this.get('hrefSchema');
104
+ }
105
+ set hrefSchema(hrefSchema) {
106
+ this.set('hrefSchema', hrefSchema);
107
+ }
108
+ get headerSchema() {
109
+ return this.get('headerSchema');
110
+ }
111
+ set headerSchema(headerSchema) {
112
+ this.set('headerSchema', headerSchema);
113
+ }
114
+
90
115
  /**
91
116
  * Submitting Data for Processing.
92
117
  *
93
118
  * URI: https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-01#section-6.6.4
94
119
  */
120
+
121
+ get submissionSchema() {
122
+ return this.get('submissionSchema');
123
+ }
124
+ set submissionSchema(submissionSchema) {
125
+ this.set('submissionSchema', submissionSchema);
126
+ }
95
127
  get submissionEncType() {
96
128
  throw new _apidomError.UnsupportedOperationError('submissionEncType keyword from Hyper-Schema vocabulary has been renamed to submissionMediaType.');
97
129
  }
@@ -1,6 +1,5 @@
1
1
  import { UnsupportedOperationError } from '@swagger-api/apidom-error';
2
2
  import { LinkDescriptionElement } from '@swagger-api/apidom-ns-json-schema-draft-6';
3
-
4
3
  /* eslint-disable class-methods-use-this */
5
4
 
6
5
  /**
@@ -53,6 +52,12 @@ class LinkDescription extends LinkDescriptionElement {
53
52
  * URI: https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-01#section-6.5
54
53
  */
55
54
 
55
+ get targetSchema() {
56
+ return this.get('targetSchema');
57
+ }
58
+ set targetSchema(targetSchema) {
59
+ this.set('targetSchema', targetSchema);
60
+ }
56
61
  get mediaType() {
57
62
  throw new UnsupportedOperationError('mediaType keyword from Hyper-Schema vocabulary has been renamed to targetMediaType.');
58
63
  }
@@ -84,11 +89,37 @@ class LinkDescription extends LinkDescriptionElement {
84
89
  this.set('$comment', $comment);
85
90
  }
86
91
 
92
+ /**
93
+ * Link Input.
94
+ *
95
+ * URI: https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-01#section-6.6
96
+ */
97
+
98
+ get hrefSchema() {
99
+ return this.get('hrefSchema');
100
+ }
101
+ set hrefSchema(hrefSchema) {
102
+ this.set('hrefSchema', hrefSchema);
103
+ }
104
+ get headerSchema() {
105
+ return this.get('headerSchema');
106
+ }
107
+ set headerSchema(headerSchema) {
108
+ this.set('headerSchema', headerSchema);
109
+ }
110
+
87
111
  /**
88
112
  * Submitting Data for Processing.
89
113
  *
90
114
  * URI: https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-01#section-6.6.4
91
115
  */
116
+
117
+ get submissionSchema() {
118
+ return this.get('submissionSchema');
119
+ }
120
+ set submissionSchema(submissionSchema) {
121
+ this.set('submissionSchema', submissionSchema);
122
+ }
92
123
  get submissionEncType() {
93
124
  throw new UnsupportedOperationError('submissionEncType keyword from Hyper-Schema vocabulary has been renamed to submissionMediaType.');
94
125
  }
package/src/index.cjs CHANGED
@@ -3,7 +3,7 @@
3
3
  var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault").default;
4
4
  var _interopRequireWildcard = require("@babel/runtime-corejs3/helpers/interopRequireWildcard").default;
5
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.isJSONReferenceLikeElement = exports.isJSONReferenceElement = exports.isElement = exports.isBooleanElement = exports.isArrayElement = exports.getNodeType = exports.default = exports.createRefractor = exports.Visitor = exports.SpecificationVisitor = exports.PatternedFieldsVisitor = exports.ParentSchemaAwareVisitor = exports.MapVisitor = exports.LinkDescriptionElement = exports.JSONSchemaElement = exports.JSONSchemaDraft7MediaTypes = exports.JSONReferenceElement = exports.FixedFieldsVisitor = exports.FallbackVisitor = exports.AlternatingVisitor = void 0;
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.isJSONReferenceLikeElement = exports.isJSONReferenceElement = exports.isElement = exports.isBooleanElement = exports.isArrayElement = exports.getNodeType = exports.default = exports.createRefractor = exports.Visitor = exports.SpecificationVisitor = exports.PatternedFieldsVisitor = exports.ParentSchemaAwareVisitor = exports.MapVisitor = exports.LinkDescriptionElement = exports.JSONSchemaVisitor = exports.JSONSchemaElement = exports.JSONSchemaDraft7MediaTypes = exports.JSONReferenceElement = exports.FixedFieldsVisitor = exports.FallbackVisitor = exports.AlternatingVisitor = void 0;
7
7
  var _apidomCore = require("@swagger-api/apidom-core");
8
8
  exports.isRefElement = _apidomCore.isRefElement;
9
9
  exports.isLinkElement = _apidomCore.isLinkElement;
@@ -42,6 +42,8 @@ exports.AlternatingVisitor = _apidomNsJsonSchemaDraft.AlternatingVisitor;
42
42
  exports.ParentSchemaAwareVisitor = _apidomNsJsonSchemaDraft.ParentSchemaAwareVisitor;
43
43
  exports.Visitor = _apidomNsJsonSchemaDraft.Visitor;
44
44
  exports.JSONReferenceElement = _apidomNsJsonSchemaDraft.JSONReferenceElement;
45
+ var _index2 = _interopRequireDefault(require("./refractor/visitors/json-schema/index.cjs"));
46
+ exports.JSONSchemaVisitor = _index2.default;
45
47
  var _visitor = require("./traversal/visitor.cjs");
46
48
  exports.keyMap = _visitor.keyMap;
47
49
  exports.getNodeType = _visitor.getNodeType;
package/src/index.mjs CHANGED
@@ -7,6 +7,7 @@ export { default as refract, createRefractor } from "./refractor/index.mjs";
7
7
  export { default as specificationObj } from "./refractor/specification.mjs";
8
8
  export { isJSONReferenceElement, isJSONSchemaElement, isLinkDescriptionElement } from "./predicates.mjs";
9
9
  export { isJSONReferenceLikeElement, SpecificationVisitor, FallbackVisitor, FixedFieldsVisitor, PatternedFieldsVisitor, MapVisitor, AlternatingVisitor, ParentSchemaAwareVisitor, Visitor } from '@swagger-api/apidom-ns-json-schema-draft-6';
10
+ export { default as JSONSchemaVisitor } from "./refractor/visitors/json-schema/index.mjs";
10
11
  export { keyMap, getNodeType } from "./traversal/visitor.mjs";
11
12
  /**
12
13
  * JSON Schema Draft 7 specification elements.
@@ -149,6 +149,9 @@ const schema = {
149
149
  },
150
150
  targetHints(...args) {
151
151
  return new _apidomCore.ObjectElement(...args);
152
+ },
153
+ headerSchema(...args) {
154
+ return new _JSONSchema.default(...args);
152
155
  }
153
156
  },
154
157
  'json-schema-properties': {
@@ -142,6 +142,9 @@ const schema = {
142
142
  },
143
143
  targetHints(...args) {
144
144
  return new ObjectElement(...args);
145
+ },
146
+ headerSchema(...args) {
147
+ return new JSONSchemaElement(...args);
145
148
  }
146
149
  },
147
150
  'json-schema-properties': {
@@ -11,5 +11,5 @@ const specification = (0, _ramda.pipe)(
11
11
  // JSON Schema object modifications
12
12
  (0, _ramda.assocPath)(['visitors', 'document', 'objects', 'JSONSchema', '$visitor'], _index.default), (0, _ramda.assocPath)(['visitors', 'document', 'objects', 'JSONSchema', 'fixedFields', '$comment'], _apidomNsJsonSchemaDraft.specificationObj.visitors.value), (0, _ramda.assocPath)(['visitors', 'document', 'objects', 'JSONSchema', 'fixedFields', 'if'], _apidomNsJsonSchemaDraft.specificationObj.visitors.JSONSchemaOrJSONReferenceVisitor), (0, _ramda.assocPath)(['visitors', 'document', 'objects', 'JSONSchema', 'fixedFields', 'then'], _apidomNsJsonSchemaDraft.specificationObj.visitors.JSONSchemaOrJSONReferenceVisitor), (0, _ramda.assocPath)(['visitors', 'document', 'objects', 'JSONSchema', 'fixedFields', 'else'], _apidomNsJsonSchemaDraft.specificationObj.visitors.JSONSchemaOrJSONReferenceVisitor), (0, _ramda.dissocPath)(['visitors', 'document', 'objects', 'JSONSchema', 'fixedFields', 'media']), (0, _ramda.assocPath)(['visitors', 'document', 'objects', 'JSONSchema', 'fixedFields', 'contentEncoding'], _apidomNsJsonSchemaDraft.specificationObj.visitors.value), (0, _ramda.assocPath)(['visitors', 'document', 'objects', 'JSONSchema', 'fixedFields', 'contentMediaType'], _apidomNsJsonSchemaDraft.specificationObj.visitors.value), (0, _ramda.assocPath)(['visitors', 'document', 'objects', 'JSONSchema', 'fixedFields', 'writeOnly'], _apidomNsJsonSchemaDraft.specificationObj.visitors.value),
13
13
  // Link Description object modifications
14
- (0, _ramda.assocPath)(['visitors', 'document', 'objects', 'LinkDescription', '$visitor'], _index2.default), (0, _ramda.assocPath)(['visitors', 'document', 'objects', 'LinkDescription', 'fixedFields', 'anchor'], _apidomNsJsonSchemaDraft.specificationObj.visitors.value), (0, _ramda.assocPath)(['visitors', 'document', 'objects', 'LinkDescription', 'fixedFields', 'anchorPointer'], _apidomNsJsonSchemaDraft.specificationObj.visitors.value), (0, _ramda.dissocPath)(['visitors', 'document', 'objects', 'LinkDescription', 'fixedFields', 'mediaType']), (0, _ramda.assocPath)(['visitors', 'document', 'objects', 'LinkDescription', 'fixedFields', 'targetMediaType'], _apidomNsJsonSchemaDraft.specificationObj.visitors.value), (0, _ramda.assocPath)(['visitors', 'document', 'objects', 'LinkDescription', 'fixedFields', 'targetHints'], _apidomNsJsonSchemaDraft.specificationObj.visitors.value), (0, _ramda.assocPath)(['visitors', 'document', 'objects', 'LinkDescription', 'fixedFields', 'description'], _apidomNsJsonSchemaDraft.specificationObj.visitors.value), (0, _ramda.assocPath)(['visitors', 'document', 'objects', 'LinkDescription', 'fixedFields', '$comment'], _apidomNsJsonSchemaDraft.specificationObj.visitors.value), (0, _ramda.dissocPath)(['visitors', 'document', 'objects', 'LinkDescription', 'fixedFields', 'submissionEncType']), (0, _ramda.assocPath)(['visitors', 'document', 'objects', 'LinkDescription', 'fixedFields', 'submissionMediaType'], _apidomNsJsonSchemaDraft.specificationObj.visitors.value))(_apidomNsJsonSchemaDraft.specificationObj);
14
+ (0, _ramda.assocPath)(['visitors', 'document', 'objects', 'LinkDescription', '$visitor'], _index2.default), (0, _ramda.assocPath)(['visitors', 'document', 'objects', 'LinkDescription', 'fixedFields', 'anchor'], _apidomNsJsonSchemaDraft.specificationObj.visitors.value), (0, _ramda.assocPath)(['visitors', 'document', 'objects', 'LinkDescription', 'fixedFields', 'anchorPointer'], _apidomNsJsonSchemaDraft.specificationObj.visitors.value), (0, _ramda.dissocPath)(['visitors', 'document', 'objects', 'LinkDescription', 'fixedFields', 'mediaType']), (0, _ramda.assocPath)(['visitors', 'document', 'objects', 'LinkDescription', 'fixedFields', 'targetMediaType'], _apidomNsJsonSchemaDraft.specificationObj.visitors.value), (0, _ramda.assocPath)(['visitors', 'document', 'objects', 'LinkDescription', 'fixedFields', 'targetHints'], _apidomNsJsonSchemaDraft.specificationObj.visitors.value), (0, _ramda.assocPath)(['visitors', 'document', 'objects', 'LinkDescription', 'fixedFields', 'description'], _apidomNsJsonSchemaDraft.specificationObj.visitors.value), (0, _ramda.assocPath)(['visitors', 'document', 'objects', 'LinkDescription', 'fixedFields', '$comment'], _apidomNsJsonSchemaDraft.specificationObj.visitors.value), (0, _ramda.assocPath)(['visitors', 'document', 'objects', 'LinkDescription', 'fixedFields', 'headerSchema'], _apidomNsJsonSchemaDraft.specificationObj.visitors.JSONSchemaOrJSONReferenceVisitor), (0, _ramda.dissocPath)(['visitors', 'document', 'objects', 'LinkDescription', 'fixedFields', 'submissionEncType']), (0, _ramda.assocPath)(['visitors', 'document', 'objects', 'LinkDescription', 'fixedFields', 'submissionMediaType'], _apidomNsJsonSchemaDraft.specificationObj.visitors.value))(_apidomNsJsonSchemaDraft.specificationObj);
15
15
  var _default = exports.default = specification;
@@ -6,5 +6,5 @@ const specification = pipe(
6
6
  // JSON Schema object modifications
7
7
  assocPath(['visitors', 'document', 'objects', 'JSONSchema', '$visitor'], JSONSchemaVisitor), assocPath(['visitors', 'document', 'objects', 'JSONSchema', 'fixedFields', '$comment'], specificationObj.visitors.value), assocPath(['visitors', 'document', 'objects', 'JSONSchema', 'fixedFields', 'if'], specificationObj.visitors.JSONSchemaOrJSONReferenceVisitor), assocPath(['visitors', 'document', 'objects', 'JSONSchema', 'fixedFields', 'then'], specificationObj.visitors.JSONSchemaOrJSONReferenceVisitor), assocPath(['visitors', 'document', 'objects', 'JSONSchema', 'fixedFields', 'else'], specificationObj.visitors.JSONSchemaOrJSONReferenceVisitor), dissocPath(['visitors', 'document', 'objects', 'JSONSchema', 'fixedFields', 'media']), assocPath(['visitors', 'document', 'objects', 'JSONSchema', 'fixedFields', 'contentEncoding'], specificationObj.visitors.value), assocPath(['visitors', 'document', 'objects', 'JSONSchema', 'fixedFields', 'contentMediaType'], specificationObj.visitors.value), assocPath(['visitors', 'document', 'objects', 'JSONSchema', 'fixedFields', 'writeOnly'], specificationObj.visitors.value),
8
8
  // Link Description object modifications
9
- assocPath(['visitors', 'document', 'objects', 'LinkDescription', '$visitor'], LinkDescriptionVisitor), assocPath(['visitors', 'document', 'objects', 'LinkDescription', 'fixedFields', 'anchor'], specificationObj.visitors.value), assocPath(['visitors', 'document', 'objects', 'LinkDescription', 'fixedFields', 'anchorPointer'], specificationObj.visitors.value), dissocPath(['visitors', 'document', 'objects', 'LinkDescription', 'fixedFields', 'mediaType']), assocPath(['visitors', 'document', 'objects', 'LinkDescription', 'fixedFields', 'targetMediaType'], specificationObj.visitors.value), assocPath(['visitors', 'document', 'objects', 'LinkDescription', 'fixedFields', 'targetHints'], specificationObj.visitors.value), assocPath(['visitors', 'document', 'objects', 'LinkDescription', 'fixedFields', 'description'], specificationObj.visitors.value), assocPath(['visitors', 'document', 'objects', 'LinkDescription', 'fixedFields', '$comment'], specificationObj.visitors.value), dissocPath(['visitors', 'document', 'objects', 'LinkDescription', 'fixedFields', 'submissionEncType']), assocPath(['visitors', 'document', 'objects', 'LinkDescription', 'fixedFields', 'submissionMediaType'], specificationObj.visitors.value))(specificationObj);
9
+ assocPath(['visitors', 'document', 'objects', 'LinkDescription', '$visitor'], LinkDescriptionVisitor), assocPath(['visitors', 'document', 'objects', 'LinkDescription', 'fixedFields', 'anchor'], specificationObj.visitors.value), assocPath(['visitors', 'document', 'objects', 'LinkDescription', 'fixedFields', 'anchorPointer'], specificationObj.visitors.value), dissocPath(['visitors', 'document', 'objects', 'LinkDescription', 'fixedFields', 'mediaType']), assocPath(['visitors', 'document', 'objects', 'LinkDescription', 'fixedFields', 'targetMediaType'], specificationObj.visitors.value), assocPath(['visitors', 'document', 'objects', 'LinkDescription', 'fixedFields', 'targetHints'], specificationObj.visitors.value), assocPath(['visitors', 'document', 'objects', 'LinkDescription', 'fixedFields', 'description'], specificationObj.visitors.value), assocPath(['visitors', 'document', 'objects', 'LinkDescription', 'fixedFields', '$comment'], specificationObj.visitors.value), assocPath(['visitors', 'document', 'objects', 'LinkDescription', 'fixedFields', 'headerSchema'], specificationObj.visitors.JSONSchemaOrJSONReferenceVisitor), dissocPath(['visitors', 'document', 'objects', 'LinkDescription', 'fixedFields', 'submissionEncType']), assocPath(['visitors', 'document', 'objects', 'LinkDescription', 'fixedFields', 'submissionMediaType'], specificationObj.visitors.value))(specificationObj);
10
10
  export default specification;
@@ -14,13 +14,23 @@ var _JSONSchema = _interopRequireDefault(require("../../../elements/JSONSchema.c
14
14
  /**
15
15
  * @public
16
16
  */
17
- class JSONSchemaVisitor extends (0, _tsMixer.Mixin)(_apidomNsJsonSchemaDraft.FixedFieldsVisitor, _apidomNsJsonSchemaDraft.FallbackVisitor) {
17
+ class JSONSchemaVisitor extends (0, _tsMixer.Mixin)(_apidomNsJsonSchemaDraft.FixedFieldsVisitor, _apidomNsJsonSchemaDraft.ParentSchemaAwareVisitor, _apidomNsJsonSchemaDraft.FallbackVisitor) {
18
18
  constructor(options) {
19
19
  super(options);
20
20
  this.specPath = (0, _ramda.always)(['document', 'objects', 'JSONSchema']);
21
21
  }
22
+
23
+ // eslint-disable-next-line class-methods-use-this
24
+ get defaultDialectIdentifier() {
25
+ return 'http://json-schema.org/draft-07/schema#';
26
+ }
22
27
  ObjectElement(objectElement) {
23
28
  this.element = new _JSONSchema.default();
29
+ this.handleDialectIdentifier(objectElement);
30
+ this.handleSchemaIdentifier(objectElement);
31
+
32
+ // for further processing consider this Schema Element as parent for all embedded Schema Elements
33
+ this.parent = this.element;
24
34
  return _apidomNsJsonSchemaDraft.FixedFieldsVisitor.prototype.ObjectElement.call(this, objectElement);
25
35
  }
26
36
  BooleanElement(booleanElement) {
@@ -28,5 +38,11 @@ class JSONSchemaVisitor extends (0, _tsMixer.Mixin)(_apidomNsJsonSchemaDraft.Fix
28
38
  this.element.classes.push('boolean-json-schema');
29
39
  return result;
30
40
  }
41
+ handleDialectIdentifier(objectElement) {
42
+ return _apidomNsJsonSchemaDraft.JSONSchemaVisitor.prototype.handleDialectIdentifier.call(this, objectElement);
43
+ }
44
+ handleSchemaIdentifier(objectElement, identifierKeyword = '$id') {
45
+ return _apidomNsJsonSchemaDraft.JSONSchemaVisitor.prototype.handleSchemaIdentifier.call(this, objectElement, identifierKeyword);
46
+ }
31
47
  }
32
48
  var _default = exports.default = JSONSchemaVisitor;
@@ -1,6 +1,6 @@
1
1
  import { Mixin } from 'ts-mixer';
2
2
  import { always } from 'ramda';
3
- import { FixedFieldsVisitor, FallbackVisitor } from '@swagger-api/apidom-ns-json-schema-draft-6';
3
+ import { FixedFieldsVisitor, ParentSchemaAwareVisitor, FallbackVisitor, JSONSchemaVisitor as JSONSchemaDraft6Visitor } from '@swagger-api/apidom-ns-json-schema-draft-6';
4
4
  import JSONSchemaElement from "../../../elements/JSONSchema.mjs";
5
5
  /**
6
6
  * @public
@@ -8,13 +8,23 @@ import JSONSchemaElement from "../../../elements/JSONSchema.mjs";
8
8
  /**
9
9
  * @public
10
10
  */
11
- class JSONSchemaVisitor extends Mixin(FixedFieldsVisitor, FallbackVisitor) {
11
+ class JSONSchemaVisitor extends Mixin(FixedFieldsVisitor, ParentSchemaAwareVisitor, FallbackVisitor) {
12
12
  constructor(options) {
13
13
  super(options);
14
14
  this.specPath = always(['document', 'objects', 'JSONSchema']);
15
15
  }
16
+
17
+ // eslint-disable-next-line class-methods-use-this
18
+ get defaultDialectIdentifier() {
19
+ return 'http://json-schema.org/draft-07/schema#';
20
+ }
16
21
  ObjectElement(objectElement) {
17
22
  this.element = new JSONSchemaElement();
23
+ this.handleDialectIdentifier(objectElement);
24
+ this.handleSchemaIdentifier(objectElement);
25
+
26
+ // for further processing consider this Schema Element as parent for all embedded Schema Elements
27
+ this.parent = this.element;
18
28
  return FixedFieldsVisitor.prototype.ObjectElement.call(this, objectElement);
19
29
  }
20
30
  BooleanElement(booleanElement) {
@@ -22,5 +32,11 @@ class JSONSchemaVisitor extends Mixin(FixedFieldsVisitor, FallbackVisitor) {
22
32
  this.element.classes.push('boolean-json-schema');
23
33
  return result;
24
34
  }
35
+ handleDialectIdentifier(objectElement) {
36
+ return JSONSchemaDraft6Visitor.prototype.handleDialectIdentifier.call(this, objectElement);
37
+ }
38
+ handleSchemaIdentifier(objectElement, identifierKeyword = '$id') {
39
+ return JSONSchemaDraft6Visitor.prototype.handleSchemaIdentifier.call(this, objectElement, identifierKeyword);
40
+ }
25
41
  }
26
42
  export default JSONSchemaVisitor;
@@ -199,6 +199,18 @@ export declare class JSONSchemaElement extends JSONSchemaElement_2 {
199
199
  *
200
200
  * URI: https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01
201
201
  */
202
+ /**
203
+ * Validation keywords for arrays
204
+ */
205
+ get containsProp(): this | BooleanElement | JSONReferenceElement | undefined;
206
+ set containsProp(contains: this | BooleanElement | JSONReferenceElement | undefined);
207
+ get items(): this | BooleanElement | JSONReferenceElement | ArrayElement | undefined;
208
+ set items(items: this | BooleanElement | JSONReferenceElement | ArrayElement | undefined);
209
+ /**
210
+ * Validation keywords for objects
211
+ */
212
+ get propertyNames(): this | BooleanElement | JSONReferenceElement | undefined;
213
+ set propertyNames(propertyNames: this | BooleanElement | JSONReferenceElement | undefined);
202
214
  /**
203
215
  * Keywords for Applying Subschemas Conditionally
204
216
  *
@@ -210,6 +222,13 @@ export declare class JSONSchemaElement extends JSONSchemaElement_2 {
210
222
  set then(then: this | BooleanElement | JSONReferenceElement | undefined);
211
223
  get else(): this | BooleanElement | JSONReferenceElement | undefined;
212
224
  set else(elseValue: this | BooleanElement | JSONReferenceElement | undefined);
225
+ /**
226
+ * Keywords for Applying Subschemas With Boolean Logic
227
+ *
228
+ * URI: https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.7
229
+ */
230
+ get not(): this | BooleanElement | JSONReferenceElement | undefined;
231
+ set not(not: this | BooleanElement | JSONReferenceElement | undefined);
213
232
  /**
214
233
  * String-Encoding Non-JSON Data
215
234
  *
@@ -237,16 +256,19 @@ export declare class JSONSchemaVisitor extends JSONSchemaVisitor_base {
237
256
  element: JSONSchemaElement;
238
257
  protected readonly specPath: SpecPath<['document', 'objects', 'JSONSchema']>;
239
258
  constructor(options: JSONSchemaVisitorOptions);
259
+ get defaultDialectIdentifier(): string;
240
260
  ObjectElement(objectElement: ObjectElement): {};
241
261
  BooleanElement(booleanElement: BooleanElement): {};
262
+ handleDialectIdentifier(objectElement: ObjectElement): void;
263
+ handleSchemaIdentifier(objectElement: ObjectElement, identifierKeyword?: string): void;
242
264
  }
243
265
 
244
- declare const JSONSchemaVisitor_base: Class<any[], FixedFieldsVisitor & FallbackVisitor, typeof FixedFieldsVisitor & typeof FallbackVisitor>;
266
+ declare const JSONSchemaVisitor_base: Class<any[], FixedFieldsVisitor & ParentSchemaAwareVisitor & FallbackVisitor, typeof FixedFieldsVisitor & typeof ParentSchemaAwareVisitor & typeof FallbackVisitor>;
245
267
 
246
268
  /**
247
269
  * @public
248
270
  */
249
- export declare interface JSONSchemaVisitorOptions extends FixedFieldsVisitorOptions, FallbackVisitorOptions {
271
+ export declare interface JSONSchemaVisitorOptions extends FixedFieldsVisitorOptions, ParentSchemaAwareVisitorOptions, FallbackVisitorOptions {
250
272
  }
251
273
 
252
274
  /**
@@ -299,6 +321,8 @@ export declare class LinkDescriptionElement extends LinkDescriptionElement_2 {
299
321
  *
300
322
  * URI: https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-01#section-6.5
301
323
  */
324
+ get targetSchema(): JSONSchemaElement | BooleanElement | JSONReferenceElement | undefined;
325
+ set targetSchema(targetSchema: JSONSchemaElement | BooleanElement | JSONReferenceElement | undefined);
302
326
  get mediaType(): StringElement | undefined;
303
327
  set mediaType(mediaType: StringElement | undefined);
304
328
  get targetMediaType(): StringElement | undefined;
@@ -309,11 +333,22 @@ export declare class LinkDescriptionElement extends LinkDescriptionElement_2 {
309
333
  set description(description: StringElement | undefined);
310
334
  get $comment(): StringElement | undefined;
311
335
  set $comment($comment: StringElement | undefined);
336
+ /**
337
+ * Link Input.
338
+ *
339
+ * URI: https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-01#section-6.6
340
+ */
341
+ get hrefSchema(): JSONSchemaElement | BooleanElement | JSONReferenceElement | undefined;
342
+ set hrefSchema(hrefSchema: JSONSchemaElement | BooleanElement | JSONReferenceElement | undefined);
343
+ get headerSchema(): JSONSchemaElement | BooleanElement | JSONReferenceElement | undefined;
344
+ set headerSchema(headerSchema: JSONSchemaElement | BooleanElement | JSONReferenceElement | undefined);
312
345
  /**
313
346
  * Submitting Data for Processing.
314
347
  *
315
348
  * URI: https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-01#section-6.6.4
316
349
  */
350
+ get submissionSchema(): JSONSchemaElement | BooleanElement | JSONReferenceElement | undefined;
351
+ set submissionSchema(submissionSchema: JSONSchemaElement | BooleanElement | JSONReferenceElement | undefined);
317
352
  get submissionEncType(): StringElement | undefined;
318
353
  set submissionEncType(submissionEncType: StringElement | undefined);
319
354
  get submissionMediaType(): StringElement | undefined;