@speclynx/apidom-ns-json-schema-draft-7 4.0.1 → 4.0.3
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 +10 -0
- package/package.json +8 -9
- package/src/elements/JSONSchema.cjs +122 -0
- package/src/elements/JSONSchema.mjs +119 -0
- package/src/elements/JSONSchema.ts +166 -0
- package/src/elements/LinkDescription.cjs +138 -0
- package/src/elements/LinkDescription.mjs +134 -0
- package/src/elements/LinkDescription.ts +194 -0
- package/src/index.cjs +42 -0
- package/src/index.mjs +13 -0
- package/src/index.ts +79 -0
- package/src/media-types.cjs +34 -0
- package/src/media-types.mjs +30 -0
- package/src/media-types.ts +40 -0
- package/src/namespace.cjs +23 -0
- package/src/namespace.mjs +18 -0
- package/src/namespace.ts +22 -0
- package/src/predicates.cjs +22 -0
- package/src/predicates.mjs +13 -0
- package/src/predicates.ts +20 -0
- package/src/refractor/index.cjs +76 -0
- package/src/refractor/index.mjs +67 -0
- package/src/refractor/index.ts +90 -0
- package/src/refractor/inspect.cjs +46 -0
- package/src/refractor/inspect.mjs +39 -0
- package/src/refractor/inspect.ts +51 -0
- package/src/refractor/plugins/replace-empty-element.cjs +235 -0
- package/src/refractor/plugins/replace-empty-element.mjs +229 -0
- package/src/refractor/plugins/replace-empty-element.ts +260 -0
- package/src/refractor/specification.cjs +15 -0
- package/src/refractor/specification.mjs +10 -0
- package/src/refractor/specification.ts +88 -0
- package/src/refractor/toolbox.cjs +26 -0
- package/src/refractor/toolbox.mjs +19 -0
- package/src/refractor/toolbox.ts +23 -0
- package/src/refractor/visitors/json-schema/index.cjs +20 -0
- package/src/refractor/visitors/json-schema/index.mjs +15 -0
- package/src/refractor/visitors/json-schema/index.ts +27 -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/refractor/visitors/json-schema/link-description/index.ts +22 -0
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,16 @@
|
|
|
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.3](https://github.com/speclynx/apidom/compare/v4.0.2...v4.0.3) (2026-03-11)
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
- **release:** fix v4.0.2 failed release ([b4dc1c4](https://github.com/speclynx/apidom/commit/b4dc1c48e8d9b2986a70e49b5554eb0a166d7528))
|
|
11
|
+
|
|
12
|
+
## [4.0.2](https://github.com/speclynx/apidom/compare/v4.0.1...v4.0.2) (2026-03-11)
|
|
13
|
+
|
|
14
|
+
**Note:** Version bump only for package @speclynx/apidom-ns-json-schema-draft-7
|
|
15
|
+
|
|
6
16
|
## [4.0.1](https://github.com/speclynx/apidom/compare/v4.0.0...v4.0.1) (2026-03-11)
|
|
7
17
|
|
|
8
18
|
**Note:** Version bump only for package @speclynx/apidom-ns-json-schema-draft-7
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@speclynx/apidom-ns-json-schema-draft-7",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.3",
|
|
4
4
|
"description": "JSON Schema Draft 7 namespace for ApiDOM.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"apidom",
|
|
@@ -57,18 +57,17 @@
|
|
|
57
57
|
"license": "Apache-2.0",
|
|
58
58
|
"dependencies": {
|
|
59
59
|
"@babel/runtime-corejs3": "^7.28.4",
|
|
60
|
-
"@speclynx/apidom-core": "4.0.
|
|
61
|
-
"@speclynx/apidom-datamodel": "4.0.
|
|
62
|
-
"@speclynx/apidom-error": "4.0.
|
|
63
|
-
"@speclynx/apidom-ns-json-schema-draft-6": "4.0.
|
|
64
|
-
"@speclynx/apidom-traverse": "4.0.
|
|
60
|
+
"@speclynx/apidom-core": "4.0.3",
|
|
61
|
+
"@speclynx/apidom-datamodel": "4.0.3",
|
|
62
|
+
"@speclynx/apidom-error": "4.0.3",
|
|
63
|
+
"@speclynx/apidom-ns-json-schema-draft-6": "4.0.3",
|
|
64
|
+
"@speclynx/apidom-traverse": "4.0.3",
|
|
65
65
|
"ramda": "~0.32.0",
|
|
66
66
|
"ramda-adjunct": "^6.0.0",
|
|
67
67
|
"ts-mixer": "^6.0.4"
|
|
68
68
|
},
|
|
69
69
|
"files": [
|
|
70
|
-
"src
|
|
71
|
-
"src/**/*.cjs",
|
|
70
|
+
"src/",
|
|
72
71
|
"dist/",
|
|
73
72
|
"types/apidom-ns-json-schema-draft-7.d.ts",
|
|
74
73
|
"LICENSES",
|
|
@@ -76,5 +75,5 @@
|
|
|
76
75
|
"README.md",
|
|
77
76
|
"CHANGELOG.md"
|
|
78
77
|
],
|
|
79
|
-
"gitHead": "
|
|
78
|
+
"gitHead": "6ccfa09c02232516215e7de3ead276641957e626"
|
|
80
79
|
}
|
|
@@ -0,0 +1,122 @@
|
|
|
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-6");
|
|
7
|
+
/**
|
|
8
|
+
* @public
|
|
9
|
+
*/
|
|
10
|
+
class JSONSchema extends _apidomNsJsonSchemaDraft.JSONSchemaElement {
|
|
11
|
+
constructor(content, meta, attributes) {
|
|
12
|
+
super(content, meta, attributes);
|
|
13
|
+
this.element = 'JSONSchemaDraft7';
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Core vocabulary
|
|
18
|
+
*
|
|
19
|
+
* URI: https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-01
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
get $comment() {
|
|
23
|
+
return this.get('$comment');
|
|
24
|
+
}
|
|
25
|
+
set $comment($comment) {
|
|
26
|
+
this.set('$comment', $comment);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Validation vocabulary
|
|
31
|
+
*
|
|
32
|
+
* URI: https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01
|
|
33
|
+
*/
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Validation keywords for arrays
|
|
37
|
+
*/
|
|
38
|
+
|
|
39
|
+
get itemsField() {
|
|
40
|
+
return this.get('items');
|
|
41
|
+
}
|
|
42
|
+
set itemsField(items) {
|
|
43
|
+
this.set('items', items);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Keywords for Applying Subschemas Conditionally
|
|
48
|
+
*
|
|
49
|
+
* URI: https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.6
|
|
50
|
+
*/
|
|
51
|
+
|
|
52
|
+
get if() {
|
|
53
|
+
return this.get('if');
|
|
54
|
+
}
|
|
55
|
+
set if(ifValue) {
|
|
56
|
+
this.set('if', ifValue);
|
|
57
|
+
}
|
|
58
|
+
get then() {
|
|
59
|
+
return this.get('then');
|
|
60
|
+
}
|
|
61
|
+
set then(then) {
|
|
62
|
+
this.set('then', then);
|
|
63
|
+
}
|
|
64
|
+
get else() {
|
|
65
|
+
return this.get('else');
|
|
66
|
+
}
|
|
67
|
+
set else(elseValue) {
|
|
68
|
+
this.set('else', elseValue);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* Keywords for Applying Subschemas With Boolean Logic
|
|
73
|
+
*
|
|
74
|
+
* URI: https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.7
|
|
75
|
+
*/
|
|
76
|
+
|
|
77
|
+
get not() {
|
|
78
|
+
return this.get('not');
|
|
79
|
+
}
|
|
80
|
+
set not(not) {
|
|
81
|
+
this.set('not', not);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* String-Encoding Non-JSON Data
|
|
86
|
+
*
|
|
87
|
+
* URI: https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-00#section-8
|
|
88
|
+
*/
|
|
89
|
+
|
|
90
|
+
get contentEncoding() {
|
|
91
|
+
return this.get('contentEncoding');
|
|
92
|
+
}
|
|
93
|
+
set contentEncoding(contentEncoding) {
|
|
94
|
+
this.set('contentEncoding', contentEncoding);
|
|
95
|
+
}
|
|
96
|
+
get contentMediaType() {
|
|
97
|
+
return this.get('contentMediaType');
|
|
98
|
+
}
|
|
99
|
+
set contentMediaType(contentMediaType) {
|
|
100
|
+
this.set('contentMediaType', contentMediaType);
|
|
101
|
+
}
|
|
102
|
+
get media() {
|
|
103
|
+
throw new _apidomError.UnsupportedOperationError('media keyword from Hyper-Schema vocabulary has been moved to validation vocabulary as "contentMediaType" / "contentEncoding"');
|
|
104
|
+
}
|
|
105
|
+
set media(_media) {
|
|
106
|
+
throw new _apidomError.UnsupportedOperationError('media keyword from Hyper-Schema vocabulary has been moved to validation vocabulary as "contentMediaType" / "contentEncoding"');
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* Schema annotations
|
|
111
|
+
*
|
|
112
|
+
* URI: https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-10
|
|
113
|
+
*/
|
|
114
|
+
|
|
115
|
+
get writeOnly() {
|
|
116
|
+
return this.get('writeOnly');
|
|
117
|
+
}
|
|
118
|
+
set writeOnly(writeOnly) {
|
|
119
|
+
this.set('writeOnly', writeOnly);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
var _default = exports.default = JSONSchema;
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import { UnsupportedOperationError } from '@speclynx/apidom-error';
|
|
2
|
+
import { JSONSchemaElement } from '@speclynx/apidom-ns-json-schema-draft-6';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* @public
|
|
6
|
+
*/
|
|
7
|
+
class JSONSchema extends JSONSchemaElement {
|
|
8
|
+
constructor(content, meta, attributes) {
|
|
9
|
+
super(content, meta, attributes);
|
|
10
|
+
this.element = 'JSONSchemaDraft7';
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Core vocabulary
|
|
15
|
+
*
|
|
16
|
+
* URI: https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-01
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
get $comment() {
|
|
20
|
+
return this.get('$comment');
|
|
21
|
+
}
|
|
22
|
+
set $comment($comment) {
|
|
23
|
+
this.set('$comment', $comment);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Validation vocabulary
|
|
28
|
+
*
|
|
29
|
+
* URI: https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01
|
|
30
|
+
*/
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Validation keywords for arrays
|
|
34
|
+
*/
|
|
35
|
+
|
|
36
|
+
get itemsField() {
|
|
37
|
+
return this.get('items');
|
|
38
|
+
}
|
|
39
|
+
set itemsField(items) {
|
|
40
|
+
this.set('items', items);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Keywords for Applying Subschemas Conditionally
|
|
45
|
+
*
|
|
46
|
+
* URI: https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.6
|
|
47
|
+
*/
|
|
48
|
+
|
|
49
|
+
get if() {
|
|
50
|
+
return this.get('if');
|
|
51
|
+
}
|
|
52
|
+
set if(ifValue) {
|
|
53
|
+
this.set('if', ifValue);
|
|
54
|
+
}
|
|
55
|
+
get then() {
|
|
56
|
+
return this.get('then');
|
|
57
|
+
}
|
|
58
|
+
set then(then) {
|
|
59
|
+
this.set('then', then);
|
|
60
|
+
}
|
|
61
|
+
get else() {
|
|
62
|
+
return this.get('else');
|
|
63
|
+
}
|
|
64
|
+
set else(elseValue) {
|
|
65
|
+
this.set('else', elseValue);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Keywords for Applying Subschemas With Boolean Logic
|
|
70
|
+
*
|
|
71
|
+
* URI: https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.7
|
|
72
|
+
*/
|
|
73
|
+
|
|
74
|
+
get not() {
|
|
75
|
+
return this.get('not');
|
|
76
|
+
}
|
|
77
|
+
set not(not) {
|
|
78
|
+
this.set('not', not);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* String-Encoding Non-JSON Data
|
|
83
|
+
*
|
|
84
|
+
* URI: https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-00#section-8
|
|
85
|
+
*/
|
|
86
|
+
|
|
87
|
+
get contentEncoding() {
|
|
88
|
+
return this.get('contentEncoding');
|
|
89
|
+
}
|
|
90
|
+
set contentEncoding(contentEncoding) {
|
|
91
|
+
this.set('contentEncoding', contentEncoding);
|
|
92
|
+
}
|
|
93
|
+
get contentMediaType() {
|
|
94
|
+
return this.get('contentMediaType');
|
|
95
|
+
}
|
|
96
|
+
set contentMediaType(contentMediaType) {
|
|
97
|
+
this.set('contentMediaType', contentMediaType);
|
|
98
|
+
}
|
|
99
|
+
get media() {
|
|
100
|
+
throw new UnsupportedOperationError('media keyword from Hyper-Schema vocabulary has been moved to validation vocabulary as "contentMediaType" / "contentEncoding"');
|
|
101
|
+
}
|
|
102
|
+
set media(_media) {
|
|
103
|
+
throw new UnsupportedOperationError('media keyword from Hyper-Schema vocabulary has been moved to validation vocabulary as "contentMediaType" / "contentEncoding"');
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* Schema annotations
|
|
108
|
+
*
|
|
109
|
+
* URI: https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-10
|
|
110
|
+
*/
|
|
111
|
+
|
|
112
|
+
get writeOnly() {
|
|
113
|
+
return this.get('writeOnly');
|
|
114
|
+
}
|
|
115
|
+
set writeOnly(writeOnly) {
|
|
116
|
+
this.set('writeOnly', writeOnly);
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
export default JSONSchema;
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
import {
|
|
2
|
+
StringElement,
|
|
3
|
+
BooleanElement,
|
|
4
|
+
ArrayElement,
|
|
5
|
+
Attributes,
|
|
6
|
+
Meta,
|
|
7
|
+
} from '@speclynx/apidom-datamodel';
|
|
8
|
+
import { UnsupportedOperationError } from '@speclynx/apidom-error';
|
|
9
|
+
import {
|
|
10
|
+
JSONSchemaElement,
|
|
11
|
+
JSONReferenceElement,
|
|
12
|
+
MediaElement,
|
|
13
|
+
} from '@speclynx/apidom-ns-json-schema-draft-6';
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* @public
|
|
17
|
+
*/
|
|
18
|
+
class JSONSchema extends JSONSchemaElement {
|
|
19
|
+
constructor(content?: Record<string, unknown>, meta?: Meta, attributes?: Attributes) {
|
|
20
|
+
super(content, meta, attributes);
|
|
21
|
+
this.element = 'JSONSchemaDraft7';
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Core vocabulary
|
|
26
|
+
*
|
|
27
|
+
* URI: https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-01
|
|
28
|
+
*/
|
|
29
|
+
|
|
30
|
+
get $comment(): StringElement | undefined {
|
|
31
|
+
return this.get('$comment') as StringElement | undefined;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
set $comment($comment: StringElement | undefined) {
|
|
35
|
+
this.set('$comment', $comment);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Validation vocabulary
|
|
40
|
+
*
|
|
41
|
+
* URI: https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01
|
|
42
|
+
*/
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Validation keywords for arrays
|
|
46
|
+
*/
|
|
47
|
+
|
|
48
|
+
override get itemsField():
|
|
49
|
+
| this
|
|
50
|
+
| BooleanElement
|
|
51
|
+
| JSONReferenceElement
|
|
52
|
+
| ArrayElement<this | BooleanElement | JSONReferenceElement>
|
|
53
|
+
| undefined {
|
|
54
|
+
return this.get('items') as
|
|
55
|
+
| this
|
|
56
|
+
| BooleanElement
|
|
57
|
+
| JSONReferenceElement
|
|
58
|
+
| ArrayElement<this | BooleanElement | JSONReferenceElement>
|
|
59
|
+
| undefined;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
override set itemsField(
|
|
63
|
+
items:
|
|
64
|
+
| this
|
|
65
|
+
| BooleanElement
|
|
66
|
+
| JSONReferenceElement
|
|
67
|
+
| ArrayElement<this | BooleanElement | JSONReferenceElement>
|
|
68
|
+
| undefined,
|
|
69
|
+
) {
|
|
70
|
+
this.set('items', items);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* Keywords for Applying Subschemas Conditionally
|
|
75
|
+
*
|
|
76
|
+
* URI: https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.6
|
|
77
|
+
*/
|
|
78
|
+
|
|
79
|
+
get if(): this | BooleanElement | JSONReferenceElement | undefined {
|
|
80
|
+
return this.get('if') as this | BooleanElement | JSONReferenceElement | undefined;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
set if(ifValue: this | BooleanElement | JSONReferenceElement | undefined) {
|
|
84
|
+
this.set('if', ifValue);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
get then(): this | BooleanElement | JSONReferenceElement | undefined {
|
|
88
|
+
return this.get('then') as this | BooleanElement | JSONReferenceElement | undefined;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
set then(then: this | BooleanElement | JSONReferenceElement | undefined) {
|
|
92
|
+
this.set('then', then);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
get else(): this | BooleanElement | JSONReferenceElement | undefined {
|
|
96
|
+
return this.get('else') as this | BooleanElement | JSONReferenceElement | undefined;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
set else(elseValue: this | BooleanElement | JSONReferenceElement | undefined) {
|
|
100
|
+
this.set('else', elseValue);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* Keywords for Applying Subschemas With Boolean Logic
|
|
105
|
+
*
|
|
106
|
+
* URI: https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.7
|
|
107
|
+
*/
|
|
108
|
+
|
|
109
|
+
override get not(): this | BooleanElement | JSONReferenceElement | undefined {
|
|
110
|
+
return this.get('not') as this | BooleanElement | JSONReferenceElement | undefined;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
override set not(not: this | BooleanElement | JSONReferenceElement | undefined) {
|
|
114
|
+
this.set('not', not);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* String-Encoding Non-JSON Data
|
|
119
|
+
*
|
|
120
|
+
* URI: https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-00#section-8
|
|
121
|
+
*/
|
|
122
|
+
|
|
123
|
+
get contentEncoding(): StringElement | undefined {
|
|
124
|
+
return this.get('contentEncoding') as StringElement | undefined;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
set contentEncoding(contentEncoding: StringElement | undefined) {
|
|
128
|
+
this.set('contentEncoding', contentEncoding);
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
get contentMediaType(): StringElement | undefined {
|
|
132
|
+
return this.get('contentMediaType') as StringElement | undefined;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
set contentMediaType(contentMediaType: StringElement | undefined) {
|
|
136
|
+
this.set('contentMediaType', contentMediaType);
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
override get media(): MediaElement | undefined {
|
|
140
|
+
throw new UnsupportedOperationError(
|
|
141
|
+
'media keyword from Hyper-Schema vocabulary has been moved to validation vocabulary as "contentMediaType" / "contentEncoding"',
|
|
142
|
+
);
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
override set media(_media: MediaElement | undefined) {
|
|
146
|
+
throw new UnsupportedOperationError(
|
|
147
|
+
'media keyword from Hyper-Schema vocabulary has been moved to validation vocabulary as "contentMediaType" / "contentEncoding"',
|
|
148
|
+
);
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
/**
|
|
152
|
+
* Schema annotations
|
|
153
|
+
*
|
|
154
|
+
* URI: https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-10
|
|
155
|
+
*/
|
|
156
|
+
|
|
157
|
+
get writeOnly(): BooleanElement | undefined {
|
|
158
|
+
return this.get('writeOnly') as BooleanElement | undefined;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
set writeOnly(writeOnly: BooleanElement | undefined) {
|
|
162
|
+
this.set('writeOnly', writeOnly);
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
export default JSONSchema;
|
|
@@ -0,0 +1,138 @@
|
|
|
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-6");
|
|
7
|
+
/**
|
|
8
|
+
* URI: https://datatracker.ietf.org/doc/html/draft-wright-json-schema-hyperschema-01#section-6
|
|
9
|
+
* @public
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
class LinkDescription extends _apidomNsJsonSchemaDraft.LinkDescriptionElement {
|
|
13
|
+
/**
|
|
14
|
+
* Link context.
|
|
15
|
+
*
|
|
16
|
+
* URI: https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-01#section-6.1
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
get anchor() {
|
|
20
|
+
return this.get('anchor');
|
|
21
|
+
}
|
|
22
|
+
set anchor(anchor) {
|
|
23
|
+
this.set('anchor', anchor);
|
|
24
|
+
}
|
|
25
|
+
get anchorPointer() {
|
|
26
|
+
return this.get('anchorPointer');
|
|
27
|
+
}
|
|
28
|
+
set anchorPointer(anchorPointer) {
|
|
29
|
+
this.set('anchorPointer', anchorPointer);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Adjusting URI Template Resolution.
|
|
34
|
+
*
|
|
35
|
+
* URI: https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-01#section-6.4
|
|
36
|
+
*/
|
|
37
|
+
|
|
38
|
+
get templatePointers() {
|
|
39
|
+
return this.get('templatePointers');
|
|
40
|
+
}
|
|
41
|
+
set templatePointers(templatePointers) {
|
|
42
|
+
this.set('templatePointers', templatePointers);
|
|
43
|
+
}
|
|
44
|
+
get templateRequired() {
|
|
45
|
+
return this.get('templateRequired');
|
|
46
|
+
}
|
|
47
|
+
set templateRequired(templateRequired) {
|
|
48
|
+
this.set('templateRequired', templateRequired);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Link Target Attributes.
|
|
53
|
+
*
|
|
54
|
+
* URI: https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-01#section-6.5
|
|
55
|
+
*/
|
|
56
|
+
|
|
57
|
+
get targetSchema() {
|
|
58
|
+
return this.get('targetSchema');
|
|
59
|
+
}
|
|
60
|
+
set targetSchema(targetSchema) {
|
|
61
|
+
this.set('targetSchema', targetSchema);
|
|
62
|
+
}
|
|
63
|
+
get mediaType() {
|
|
64
|
+
throw new _apidomError.UnsupportedOperationError('mediaType keyword from Hyper-Schema vocabulary has been renamed to targetMediaType.');
|
|
65
|
+
}
|
|
66
|
+
set mediaType(mediaType) {
|
|
67
|
+
throw new _apidomError.UnsupportedOperationError('mediaType keyword from Hyper-Schema vocabulary has been renamed to targetMediaType.');
|
|
68
|
+
}
|
|
69
|
+
get targetMediaType() {
|
|
70
|
+
return this.get('targetMediaType');
|
|
71
|
+
}
|
|
72
|
+
set targetMediaType(targetMediaType) {
|
|
73
|
+
this.set('targetMediaType', targetMediaType);
|
|
74
|
+
}
|
|
75
|
+
get targetHints() {
|
|
76
|
+
return this.get('targetHints');
|
|
77
|
+
}
|
|
78
|
+
set targetHints(targetHints) {
|
|
79
|
+
this.set('targetHints', targetHints);
|
|
80
|
+
}
|
|
81
|
+
get description() {
|
|
82
|
+
return this.get('description');
|
|
83
|
+
}
|
|
84
|
+
set description(description) {
|
|
85
|
+
this.set('description', description);
|
|
86
|
+
}
|
|
87
|
+
get $comment() {
|
|
88
|
+
return this.get('$comment');
|
|
89
|
+
}
|
|
90
|
+
set $comment($comment) {
|
|
91
|
+
this.set('$comment', $comment);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* Link Input.
|
|
96
|
+
*
|
|
97
|
+
* URI: https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-01#section-6.6
|
|
98
|
+
*/
|
|
99
|
+
|
|
100
|
+
get hrefSchema() {
|
|
101
|
+
return this.get('hrefSchema');
|
|
102
|
+
}
|
|
103
|
+
set hrefSchema(hrefSchema) {
|
|
104
|
+
this.set('hrefSchema', hrefSchema);
|
|
105
|
+
}
|
|
106
|
+
get headerSchema() {
|
|
107
|
+
return this.get('headerSchema');
|
|
108
|
+
}
|
|
109
|
+
set headerSchema(headerSchema) {
|
|
110
|
+
this.set('headerSchema', headerSchema);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* Submitting Data for Processing.
|
|
115
|
+
*
|
|
116
|
+
* URI: https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-01#section-6.6.4
|
|
117
|
+
*/
|
|
118
|
+
|
|
119
|
+
get submissionSchema() {
|
|
120
|
+
return this.get('submissionSchema');
|
|
121
|
+
}
|
|
122
|
+
set submissionSchema(submissionSchema) {
|
|
123
|
+
this.set('submissionSchema', submissionSchema);
|
|
124
|
+
}
|
|
125
|
+
get submissionEncType() {
|
|
126
|
+
throw new _apidomError.UnsupportedOperationError('submissionEncType keyword from Hyper-Schema vocabulary has been renamed to submissionMediaType.');
|
|
127
|
+
}
|
|
128
|
+
set submissionEncType(submissionEncType) {
|
|
129
|
+
throw new _apidomError.UnsupportedOperationError('submissionEncType keyword from Hyper-Schema vocabulary has been renamed to submissionMediaType.');
|
|
130
|
+
}
|
|
131
|
+
get submissionMediaType() {
|
|
132
|
+
return this.get('submissionMediaType');
|
|
133
|
+
}
|
|
134
|
+
set submissionMediaType(submissionMediaType) {
|
|
135
|
+
this.set('submissionMediaType', submissionMediaType);
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
var _default = exports.default = LinkDescription;
|