@speclynx/apidom-ns-openapi-2 4.0.3 → 4.0.4

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 (112) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/apidom-ns-openapi-2.browser.js +7 -7
  3. package/dist/apidom-ns-openapi-2.browser.min.js +1 -1
  4. package/package.json +9 -8
  5. package/src/elements/Contact.ts +0 -42
  6. package/src/elements/Definitions.ts +0 -13
  7. package/src/elements/Example.ts +0 -13
  8. package/src/elements/ExternalDocumentation.ts +0 -34
  9. package/src/elements/Header.ts +0 -261
  10. package/src/elements/Headers.ts +0 -13
  11. package/src/elements/Info.ts +0 -70
  12. package/src/elements/Items.ts +0 -264
  13. package/src/elements/License.ts +0 -34
  14. package/src/elements/Operation.ts +0 -106
  15. package/src/elements/Parameter.ts +0 -326
  16. package/src/elements/ParametersDefinitions.ts +0 -13
  17. package/src/elements/PathItem.ts +0 -93
  18. package/src/elements/Paths.ts +0 -13
  19. package/src/elements/Reference.ts +0 -27
  20. package/src/elements/Response.ts +0 -54
  21. package/src/elements/Responses.ts +0 -24
  22. package/src/elements/ResponsesDefinitions.ts +0 -13
  23. package/src/elements/Schema.ts +0 -204
  24. package/src/elements/Scopes.ts +0 -13
  25. package/src/elements/SecurityDefinitions.ts +0 -13
  26. package/src/elements/SecurityRequirement.ts +0 -13
  27. package/src/elements/SecurityScheme.ts +0 -83
  28. package/src/elements/Swagger.ts +0 -149
  29. package/src/elements/SwaggerVersion.ts +0 -15
  30. package/src/elements/Tag.ts +0 -44
  31. package/src/elements/Xml.ts +0 -59
  32. package/src/elements/nces/OperationConsumes.ts +0 -15
  33. package/src/elements/nces/OperationParameters.ts +0 -16
  34. package/src/elements/nces/OperationProduces.ts +0 -15
  35. package/src/elements/nces/OperationSchemes.ts +0 -15
  36. package/src/elements/nces/OperationSecurity.ts +0 -16
  37. package/src/elements/nces/OperationTags.ts +0 -16
  38. package/src/elements/nces/PathItemParameters.ts +0 -16
  39. package/src/elements/nces/SwaggerConsumes.ts +0 -15
  40. package/src/elements/nces/SwaggerProduces.ts +0 -15
  41. package/src/elements/nces/SwaggerSchemes.ts +0 -15
  42. package/src/elements/nces/SwaggerSecurity.ts +0 -16
  43. package/src/elements/nces/SwaggerTags.ts +0 -15
  44. package/src/index.ts +0 -368
  45. package/src/media-types.ts +0 -42
  46. package/src/namespace.ts +0 -70
  47. package/src/predicates.ts +0 -194
  48. package/src/refractor/index.ts +0 -330
  49. package/src/refractor/inspect.ts +0 -181
  50. package/src/refractor/plugins/replace-empty-element.ts +0 -389
  51. package/src/refractor/predicates.ts +0 -29
  52. package/src/refractor/specification.ts +0 -444
  53. package/src/refractor/toolbox.ts +0 -24
  54. package/src/refractor/visitors/FallbackVisitor.ts +0 -25
  55. package/src/refractor/visitors/SpecificationExtensionVisitor.ts +0 -22
  56. package/src/refractor/visitors/SpecificationVisitor.ts +0 -83
  57. package/src/refractor/visitors/Visitor.ts +0 -47
  58. package/src/refractor/visitors/generics/AlternatingVisitor.ts +0 -45
  59. package/src/refractor/visitors/generics/FixedFieldsVisitor.ts +0 -109
  60. package/src/refractor/visitors/generics/MapVisitor.ts +0 -25
  61. package/src/refractor/visitors/generics/MixedFieldsVisitor.ts +0 -77
  62. package/src/refractor/visitors/generics/PatternedFieldsVisitor.ts +0 -99
  63. package/src/refractor/visitors/open-api-2/BasePathVisitor.ts +0 -20
  64. package/src/refractor/visitors/open-api-2/ConsumesVisitor.ts +0 -29
  65. package/src/refractor/visitors/open-api-2/HostVisitor.ts +0 -20
  66. package/src/refractor/visitors/open-api-2/ProducesVisitor.ts +0 -29
  67. package/src/refractor/visitors/open-api-2/SchemesVisitor.ts +0 -29
  68. package/src/refractor/visitors/open-api-2/SecurityVisitor.ts +0 -34
  69. package/src/refractor/visitors/open-api-2/SwaggerVisitor.ts +0 -29
  70. package/src/refractor/visitors/open-api-2/TagsVisitor.ts +0 -34
  71. package/src/refractor/visitors/open-api-2/bases.ts +0 -82
  72. package/src/refractor/visitors/open-api-2/contact/index.ts +0 -27
  73. package/src/refractor/visitors/open-api-2/definitions/index.ts +0 -48
  74. package/src/refractor/visitors/open-api-2/example/index.ts +0 -27
  75. package/src/refractor/visitors/open-api-2/external-documentation/index.ts +0 -27
  76. package/src/refractor/visitors/open-api-2/header/index.ts +0 -27
  77. package/src/refractor/visitors/open-api-2/headers/index.ts +0 -27
  78. package/src/refractor/visitors/open-api-2/index.ts +0 -28
  79. package/src/refractor/visitors/open-api-2/info/VersionVisitor.ts +0 -21
  80. package/src/refractor/visitors/open-api-2/info/index.ts +0 -27
  81. package/src/refractor/visitors/open-api-2/items/index.ts +0 -27
  82. package/src/refractor/visitors/open-api-2/license/index.ts +0 -27
  83. package/src/refractor/visitors/open-api-2/operation/ConsumesVisitor.ts +0 -29
  84. package/src/refractor/visitors/open-api-2/operation/ParametersVisitor.ts +0 -44
  85. package/src/refractor/visitors/open-api-2/operation/ProducesVisitor.ts +0 -29
  86. package/src/refractor/visitors/open-api-2/operation/SchemesVisitor.ts +0 -29
  87. package/src/refractor/visitors/open-api-2/operation/SecurityVisitor.ts +0 -34
  88. package/src/refractor/visitors/open-api-2/operation/TagsVisitor.ts +0 -29
  89. package/src/refractor/visitors/open-api-2/operation/index.ts +0 -24
  90. package/src/refractor/visitors/open-api-2/parameter/index.ts +0 -27
  91. package/src/refractor/visitors/open-api-2/parameters-definitions/index.ts +0 -24
  92. package/src/refractor/visitors/open-api-2/path-item/$RefVisitor.ts +0 -20
  93. package/src/refractor/visitors/open-api-2/path-item/ParametersVisitor.ts +0 -44
  94. package/src/refractor/visitors/open-api-2/path-item/index.ts +0 -48
  95. package/src/refractor/visitors/open-api-2/paths/index.ts +0 -48
  96. package/src/refractor/visitors/open-api-2/reference/$RefVisitor.ts +0 -20
  97. package/src/refractor/visitors/open-api-2/reference/index.ts +0 -38
  98. package/src/refractor/visitors/open-api-2/response/index.ts +0 -27
  99. package/src/refractor/visitors/open-api-2/responses/DefaultVisitor.ts +0 -36
  100. package/src/refractor/visitors/open-api-2/responses/index.ts +0 -64
  101. package/src/refractor/visitors/open-api-2/responses-definitions/index.ts +0 -24
  102. package/src/refractor/visitors/open-api-2/schema/AllOfVisitor.ts +0 -35
  103. package/src/refractor/visitors/open-api-2/schema/ItemsVisitor.ts +0 -38
  104. package/src/refractor/visitors/open-api-2/schema/PropertiesVisitor.ts +0 -35
  105. package/src/refractor/visitors/open-api-2/schema/SchemaOrJSONReferenceVisitor.ts +0 -37
  106. package/src/refractor/visitors/open-api-2/schema/index.ts +0 -27
  107. package/src/refractor/visitors/open-api-2/scopes/index.ts +0 -27
  108. package/src/refractor/visitors/open-api-2/security-definitions/index.ts +0 -24
  109. package/src/refractor/visitors/open-api-2/security-requirement/index.ts +0 -24
  110. package/src/refractor/visitors/open-api-2/security-scheme/index.ts +0 -27
  111. package/src/refractor/visitors/open-api-2/tag/index.ts +0 -27
  112. package/src/refractor/visitors/open-api-2/xml/index.ts +0 -27
@@ -1,326 +0,0 @@
1
- import {
2
- StringElement,
3
- BooleanElement,
4
- type Attributes,
5
- type Meta,
6
- NumberElement,
7
- ArrayElement,
8
- ObjectElement,
9
- } from '@speclynx/apidom-datamodel';
10
- import { UnsupportedOperationError } from '@speclynx/apidom-error';
11
- import {
12
- JSONReferenceElement,
13
- JSONSchemaElement,
14
- MediaElement,
15
- LinkDescriptionElement,
16
- } from '@speclynx/apidom-ns-json-schema-draft-4';
17
-
18
- import SchemaElement from './Schema.ts';
19
-
20
- /**
21
- * @public
22
- */
23
- class Parameter extends JSONSchemaElement {
24
- constructor(content?: Record<string, unknown>, meta?: Meta, attributes?: Attributes) {
25
- super(content, meta, attributes);
26
- this.element = 'parameter';
27
- this.classes.push('json-schema-draft-4');
28
- }
29
-
30
- /**
31
- * Core vocabulary
32
- *
33
- * URI: https://tools.ietf.org/html/draft-wright-json-schema-00
34
- */
35
-
36
- get idField(): StringElement | undefined {
37
- throw new UnsupportedOperationError('idField getter in Parameter class is not not supported.');
38
- }
39
-
40
- set idField(idField: StringElement | undefined) {
41
- throw new UnsupportedOperationError('idField setter in Parameter class is not not supported.');
42
- }
43
-
44
- get $schema(): StringElement | undefined {
45
- throw new UnsupportedOperationError('$schema getter in Parameter class is not not supported.');
46
- }
47
-
48
- set $schema($schema: StringElement | undefined) {
49
- throw new UnsupportedOperationError('$schema setter in Parameter class is not not supported.');
50
- }
51
-
52
- /**
53
- * Validation keywords for arrays
54
- */
55
-
56
- get additionalItems(): this | JSONReferenceElement | BooleanElement | undefined {
57
- throw new UnsupportedOperationError(
58
- 'additionalItems getter in Parameter class is not not supported.',
59
- );
60
- }
61
-
62
- set additionalItems(additionalItems: this | JSONReferenceElement | BooleanElement | undefined) {
63
- throw new UnsupportedOperationError(
64
- 'additionalItems setter in Parameter class is not not supported.',
65
- );
66
- }
67
-
68
- get itemsField(): this | undefined {
69
- return this.get('items') as this | undefined;
70
- }
71
-
72
- set itemsField(items: this | undefined) {
73
- this.set('items', items);
74
- }
75
-
76
- /**
77
- * Validation keywords for objects
78
- */
79
-
80
- get maxProperties(): NumberElement | undefined {
81
- throw new UnsupportedOperationError(
82
- 'maxProperties getter in Parameter class is not not supported.',
83
- );
84
- }
85
-
86
- set maxProperties(maxProperties: NumberElement | undefined) {
87
- throw new UnsupportedOperationError(
88
- 'maxProperties setter in Parameter class is not not supported.',
89
- );
90
- }
91
-
92
- get minProperties(): NumberElement | undefined {
93
- throw new UnsupportedOperationError(
94
- 'minProperties getter in Parameter class is not not supported.',
95
- );
96
- }
97
-
98
- set minProperties(minProperties: NumberElement | undefined) {
99
- throw new UnsupportedOperationError(
100
- 'minProperties setter in Parameter class is not not supported.',
101
- );
102
- }
103
-
104
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
105
- get required(): BooleanElement | undefined | any {
106
- return this.get('required') as BooleanElement | undefined | any;
107
- }
108
-
109
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
110
- set required(required: BooleanElement | undefined | any) {
111
- this.set('required', required);
112
- }
113
-
114
- get properties(): ObjectElement | undefined {
115
- throw new UnsupportedOperationError(
116
- 'properties getter in Parameter class is not not supported.',
117
- );
118
- }
119
-
120
- set properties(properties: ObjectElement | undefined) {
121
- throw new UnsupportedOperationError(
122
- 'properties setter in Parameter class is not not supported.',
123
- );
124
- }
125
-
126
- get additionalProperties(): this | JSONReferenceElement | BooleanElement | undefined {
127
- throw new UnsupportedOperationError(
128
- 'additionalProperties getter in Parameter class is not not supported.',
129
- );
130
- }
131
-
132
- set additionalProperties(
133
- additionalProperties: this | JSONReferenceElement | BooleanElement | undefined,
134
- ) {
135
- throw new UnsupportedOperationError(
136
- 'additionalProperties setter in Parameter class is not not supported.',
137
- );
138
- }
139
-
140
- get patternProperties(): ObjectElement | undefined {
141
- throw new UnsupportedOperationError(
142
- 'patternProperties getter in Parameter class is not not supported.',
143
- );
144
- }
145
-
146
- set patternProperties(patternProperties: ObjectElement | undefined) {
147
- throw new UnsupportedOperationError(
148
- 'patternProperties setter in Parameter class is not not supported.',
149
- );
150
- }
151
-
152
- get dependencies(): ObjectElement | undefined {
153
- throw new UnsupportedOperationError(
154
- 'dependencies getter in Parameter class is not not supported.',
155
- );
156
- }
157
-
158
- set dependencies(dependencies: ObjectElement | undefined) {
159
- throw new UnsupportedOperationError(
160
- 'dependencies setter in Parameter class is not not supported.',
161
- );
162
- }
163
-
164
- /**
165
- * Validation keywords for any instance type
166
- */
167
-
168
- get type(): StringElement | undefined {
169
- return this.get('type') as StringElement | undefined;
170
- }
171
-
172
- set type(type: StringElement | undefined) {
173
- this.set('type', type);
174
- }
175
-
176
- get allOf(): ArrayElement<this | JSONReferenceElement> | undefined {
177
- throw new UnsupportedOperationError('allOf getter in Parameter class is not not supported.');
178
- }
179
-
180
- set allOf(allOf: ArrayElement<this | JSONReferenceElement> | undefined) {
181
- throw new UnsupportedOperationError('allOf setter in Parameter class is not not supported.');
182
- }
183
-
184
- get anyOf(): ArrayElement<this | JSONReferenceElement> | undefined {
185
- throw new UnsupportedOperationError('anyOf getter in Parameter class is not not supported.');
186
- }
187
-
188
- set anyOf(anyOf: ArrayElement<this | JSONReferenceElement> | undefined) {
189
- throw new UnsupportedOperationError('anyOf setter in Parameter class is not not supported.');
190
- }
191
-
192
- get oneOf(): ArrayElement<this | JSONReferenceElement> | undefined {
193
- throw new UnsupportedOperationError('oneOf getter in Parameter class is not not supported.');
194
- }
195
-
196
- set oneOf(oneOf: ArrayElement<this | JSONReferenceElement> | undefined) {
197
- throw new UnsupportedOperationError('oneOf setter in Parameter class is not not supported.');
198
- }
199
-
200
- get not(): this | JSONReferenceElement | undefined {
201
- throw new UnsupportedOperationError('not getter in Parameter class is not not supported.');
202
- }
203
-
204
- set not(not: this | JSONReferenceElement | undefined) {
205
- throw new UnsupportedOperationError('not setter in Parameter class is not not supported.');
206
- }
207
-
208
- get definitions(): ObjectElement | undefined {
209
- throw new UnsupportedOperationError(
210
- 'definitions getter in Parameter class is not not supported.',
211
- );
212
- }
213
-
214
- set definitions(definitions: ObjectElement | undefined) {
215
- throw new UnsupportedOperationError(
216
- 'definitions setter in Parameter class is not not supported.',
217
- );
218
- }
219
-
220
- /**
221
- * Metadata keywords
222
- *
223
- * URI: https://datatracker.ietf.org/doc/html/draft-wright-json-schema-validation-00#section-6
224
- */
225
-
226
- get title(): StringElement | undefined {
227
- throw new UnsupportedOperationError('title getter in Parameter class is not not supported.');
228
- }
229
-
230
- set title(title: StringElement | undefined) {
231
- throw new UnsupportedOperationError('title setter in Parameter class is not not supported.');
232
- }
233
-
234
- get description(): StringElement | undefined {
235
- return this.get('description') as StringElement | undefined;
236
- }
237
-
238
- set description(description: StringElement | undefined) {
239
- this.set('description', description);
240
- }
241
-
242
- /**
243
- * Semantic validation with "format"
244
- *
245
- * URI: https://datatracker.ietf.org/doc/html/draft-wright-json-schema-validation-00#section-7
246
- */
247
-
248
- get format(): StringElement | undefined {
249
- return this.get('format') as StringElement | undefined;
250
- }
251
-
252
- set format(format: StringElement | undefined) {
253
- this.set('format', format);
254
- }
255
-
256
- /**
257
- * JSON Hyper-Schema
258
- *
259
- * URI: https://datatracker.ietf.org/doc/html/draft-wright-json-schema-hyperschema-00
260
- */
261
-
262
- get base(): StringElement | undefined {
263
- throw new UnsupportedOperationError('base getter in Parameter class is not not supported.');
264
- }
265
-
266
- set base(base: StringElement | undefined) {
267
- throw new UnsupportedOperationError('base setter in Parameter class is not not supported.');
268
- }
269
-
270
- get linksField(): ArrayElement<LinkDescriptionElement> | undefined {
271
- throw new UnsupportedOperationError(
272
- 'linksField getter in Parameter class is not not supported.',
273
- );
274
- }
275
-
276
- set linksField(links: ArrayElement<LinkDescriptionElement> | undefined) {
277
- throw new UnsupportedOperationError(
278
- 'linksField setter in Parameter class is not not supported.',
279
- );
280
- }
281
-
282
- get media(): MediaElement | undefined {
283
- throw new UnsupportedOperationError('media getter in Parameter class is not not supported.');
284
- }
285
-
286
- set media(media: MediaElement | undefined) {
287
- throw new UnsupportedOperationError('media setter in Parameter class is not not supported.');
288
- }
289
-
290
- get readOnly(): BooleanElement | undefined {
291
- throw new UnsupportedOperationError('readOnly getter in Parameter class is not not supported.');
292
- }
293
-
294
- set readOnly(readOnly: BooleanElement | undefined) {
295
- throw new UnsupportedOperationError('readOnly setter in Parameter class is not not supported.');
296
- }
297
-
298
- /**
299
- * OpenAPI vocabulary
300
- */
301
- get name(): StringElement | undefined {
302
- return this.get('name') as StringElement | undefined;
303
- }
304
-
305
- set name(name: StringElement | undefined) {
306
- this.set('name', name);
307
- }
308
-
309
- get in(): StringElement | undefined {
310
- return this.get('in') as StringElement | undefined;
311
- }
312
-
313
- set in(val: StringElement | undefined) {
314
- this.set('in', val);
315
- }
316
-
317
- get schema(): SchemaElement | undefined {
318
- return this.get('schema') as SchemaElement | undefined;
319
- }
320
-
321
- set schema(schema: SchemaElement | undefined) {
322
- this.set('schema', schema);
323
- }
324
- }
325
-
326
- export default Parameter;
@@ -1,13 +0,0 @@
1
- import { ObjectElement, type Attributes, type Meta } from '@speclynx/apidom-datamodel';
2
-
3
- /**
4
- * @public
5
- */
6
- class ParametersDefinitions extends ObjectElement {
7
- constructor(content?: Record<string, unknown>, meta?: Meta, attributes?: Attributes) {
8
- super(content, meta, attributes);
9
- this.element = 'parametersDefinitions';
10
- }
11
- }
12
-
13
- export default ParametersDefinitions;
@@ -1,93 +0,0 @@
1
- import {
2
- StringElement,
3
- ObjectElement,
4
- ArrayElement,
5
- type Attributes,
6
- type Meta,
7
- } from '@speclynx/apidom-datamodel';
8
-
9
- import OperationElement from './Operation.ts';
10
-
11
- /**
12
- * @public
13
- */
14
- class PathItem extends ObjectElement {
15
- constructor(content?: Record<string, unknown>, meta?: Meta, attributes?: Attributes) {
16
- super(content, meta, attributes);
17
- this.element = 'pathItem';
18
- }
19
-
20
- get $ref(): StringElement | undefined {
21
- return this.get('$ref') as StringElement | undefined;
22
- }
23
-
24
- set $ref($ref: StringElement | undefined) {
25
- this.set('$ref', $ref);
26
- }
27
-
28
- get getField(): OperationElement | undefined {
29
- return this.get('get') as OperationElement | undefined;
30
- }
31
-
32
- set getField(operation: OperationElement | undefined) {
33
- this.set('get', operation);
34
- }
35
-
36
- get put(): OperationElement | undefined {
37
- return this.get('put') as OperationElement | undefined;
38
- }
39
-
40
- set put(operation: OperationElement | undefined) {
41
- this.set('put', operation);
42
- }
43
-
44
- get post(): OperationElement | undefined {
45
- return this.get('post') as OperationElement | undefined;
46
- }
47
-
48
- set post(operation: OperationElement | undefined) {
49
- this.set('post', operation);
50
- }
51
-
52
- get deleteField(): OperationElement | undefined {
53
- return this.get('delete') as OperationElement | undefined;
54
- }
55
-
56
- set deleteField(operation: OperationElement | undefined) {
57
- this.set('delete', operation);
58
- }
59
-
60
- get options(): OperationElement | undefined {
61
- return this.get('options') as OperationElement | undefined;
62
- }
63
-
64
- set options(operation: OperationElement | undefined) {
65
- this.set('options', operation);
66
- }
67
-
68
- get head(): OperationElement | undefined {
69
- return this.get('head') as OperationElement | undefined;
70
- }
71
-
72
- set head(operation: OperationElement | undefined) {
73
- this.set('head', operation);
74
- }
75
-
76
- get patch(): OperationElement | undefined {
77
- return this.get('patch') as OperationElement | undefined;
78
- }
79
-
80
- set patch(operation: OperationElement | undefined) {
81
- this.set('patch', operation);
82
- }
83
-
84
- get parameters(): ArrayElement {
85
- return this.get('parameters') as ArrayElement;
86
- }
87
-
88
- set parameters(parameters: ArrayElement | undefined) {
89
- this.set('parameters', parameters);
90
- }
91
- }
92
-
93
- export default PathItem;
@@ -1,13 +0,0 @@
1
- import { ObjectElement, type Attributes, type Meta } from '@speclynx/apidom-datamodel';
2
-
3
- /**
4
- * @public
5
- */
6
- class Paths extends ObjectElement {
7
- constructor(content?: Record<string, unknown>, meta?: Meta, attributes?: Attributes) {
8
- super(content, meta, attributes);
9
- this.element = 'paths';
10
- }
11
- }
12
-
13
- export default Paths;
@@ -1,27 +0,0 @@
1
- import {
2
- StringElement,
3
- ObjectElement,
4
- type Attributes,
5
- type Meta,
6
- } from '@speclynx/apidom-datamodel';
7
-
8
- /**
9
- * @public
10
- */
11
- class Reference extends ObjectElement {
12
- constructor(content?: Record<string, unknown>, meta?: Meta, attributes?: Attributes) {
13
- super(content, meta, attributes);
14
- this.element = 'reference';
15
- this.classes.push('openapi-reference');
16
- }
17
-
18
- get $ref(): StringElement | undefined {
19
- return this.get('$ref') as StringElement | undefined;
20
- }
21
-
22
- set $ref($ref: StringElement | undefined) {
23
- this.set('$ref', $ref);
24
- }
25
- }
26
-
27
- export default Reference;
@@ -1,54 +0,0 @@
1
- import {
2
- StringElement,
3
- ObjectElement,
4
- type Attributes,
5
- type Meta,
6
- } from '@speclynx/apidom-datamodel';
7
-
8
- import SchemaElement from './Schema.ts';
9
- import HeadersElement from './Headers.ts';
10
- import ExampleElement from './Example.ts';
11
-
12
- /**
13
- * @public
14
- */
15
- class Response extends ObjectElement {
16
- constructor(content?: Record<string, unknown>, meta?: Meta, attributes?: Attributes) {
17
- super(content, meta, attributes);
18
- this.element = 'response';
19
- }
20
-
21
- get description(): StringElement | undefined {
22
- return this.get('description') as StringElement | undefined;
23
- }
24
-
25
- set description(description: StringElement | undefined) {
26
- this.set('description', description);
27
- }
28
-
29
- get schema(): SchemaElement | undefined {
30
- return this.get('schema') as SchemaElement | undefined;
31
- }
32
-
33
- set schema(schema: SchemaElement | undefined) {
34
- this.set('schema', schema);
35
- }
36
-
37
- get headers(): HeadersElement | undefined {
38
- return this.get('headers') as HeadersElement | undefined;
39
- }
40
-
41
- set headers(headers: HeadersElement | undefined) {
42
- this.set('headers', headers);
43
- }
44
-
45
- get examples(): ExampleElement | undefined {
46
- return this.get('examples') as ExampleElement | undefined;
47
- }
48
-
49
- set examples(examples: ExampleElement | undefined) {
50
- this.set('examples', examples);
51
- }
52
- }
53
-
54
- export default Response;
@@ -1,24 +0,0 @@
1
- import { ObjectElement, type Attributes, type Meta } from '@speclynx/apidom-datamodel';
2
-
3
- import ResponseElement from './Response.ts';
4
- import ReferenceElement from './Reference.ts';
5
-
6
- /**
7
- * @public
8
- */
9
- class Responses extends ObjectElement {
10
- constructor(content?: Record<string, unknown>, meta?: Meta, attributes?: Attributes) {
11
- super(content, meta, attributes);
12
- this.element = 'responses';
13
- }
14
-
15
- get default(): ResponseElement | ReferenceElement | undefined {
16
- return this.get('default') as ResponseElement | ReferenceElement | undefined;
17
- }
18
-
19
- set default(defaultValue: ResponseElement | ReferenceElement | undefined) {
20
- this.set('default', defaultValue);
21
- }
22
- }
23
-
24
- export default Responses;
@@ -1,13 +0,0 @@
1
- import { ObjectElement, type Attributes, type Meta } from '@speclynx/apidom-datamodel';
2
-
3
- /**
4
- * @public
5
- */
6
- class ResponsesDefinitions extends ObjectElement {
7
- constructor(content?: Record<string, unknown>, meta?: Meta, attributes?: Attributes) {
8
- super(content, meta, attributes);
9
- this.element = 'responsesDefinitions';
10
- }
11
- }
12
-
13
- export default ResponsesDefinitions;