@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.
- package/CHANGELOG.md +6 -0
- package/dist/apidom-ns-openapi-2.browser.js +7 -7
- package/dist/apidom-ns-openapi-2.browser.min.js +1 -1
- package/package.json +9 -8
- package/src/elements/Contact.ts +0 -42
- package/src/elements/Definitions.ts +0 -13
- package/src/elements/Example.ts +0 -13
- package/src/elements/ExternalDocumentation.ts +0 -34
- package/src/elements/Header.ts +0 -261
- package/src/elements/Headers.ts +0 -13
- package/src/elements/Info.ts +0 -70
- package/src/elements/Items.ts +0 -264
- package/src/elements/License.ts +0 -34
- package/src/elements/Operation.ts +0 -106
- package/src/elements/Parameter.ts +0 -326
- package/src/elements/ParametersDefinitions.ts +0 -13
- package/src/elements/PathItem.ts +0 -93
- package/src/elements/Paths.ts +0 -13
- package/src/elements/Reference.ts +0 -27
- package/src/elements/Response.ts +0 -54
- package/src/elements/Responses.ts +0 -24
- package/src/elements/ResponsesDefinitions.ts +0 -13
- package/src/elements/Schema.ts +0 -204
- package/src/elements/Scopes.ts +0 -13
- package/src/elements/SecurityDefinitions.ts +0 -13
- package/src/elements/SecurityRequirement.ts +0 -13
- package/src/elements/SecurityScheme.ts +0 -83
- package/src/elements/Swagger.ts +0 -149
- package/src/elements/SwaggerVersion.ts +0 -15
- package/src/elements/Tag.ts +0 -44
- package/src/elements/Xml.ts +0 -59
- package/src/elements/nces/OperationConsumes.ts +0 -15
- package/src/elements/nces/OperationParameters.ts +0 -16
- package/src/elements/nces/OperationProduces.ts +0 -15
- package/src/elements/nces/OperationSchemes.ts +0 -15
- package/src/elements/nces/OperationSecurity.ts +0 -16
- package/src/elements/nces/OperationTags.ts +0 -16
- package/src/elements/nces/PathItemParameters.ts +0 -16
- package/src/elements/nces/SwaggerConsumes.ts +0 -15
- package/src/elements/nces/SwaggerProduces.ts +0 -15
- package/src/elements/nces/SwaggerSchemes.ts +0 -15
- package/src/elements/nces/SwaggerSecurity.ts +0 -16
- package/src/elements/nces/SwaggerTags.ts +0 -15
- package/src/index.ts +0 -368
- package/src/media-types.ts +0 -42
- package/src/namespace.ts +0 -70
- package/src/predicates.ts +0 -194
- package/src/refractor/index.ts +0 -330
- package/src/refractor/inspect.ts +0 -181
- package/src/refractor/plugins/replace-empty-element.ts +0 -389
- package/src/refractor/predicates.ts +0 -29
- package/src/refractor/specification.ts +0 -444
- package/src/refractor/toolbox.ts +0 -24
- package/src/refractor/visitors/FallbackVisitor.ts +0 -25
- package/src/refractor/visitors/SpecificationExtensionVisitor.ts +0 -22
- package/src/refractor/visitors/SpecificationVisitor.ts +0 -83
- package/src/refractor/visitors/Visitor.ts +0 -47
- package/src/refractor/visitors/generics/AlternatingVisitor.ts +0 -45
- package/src/refractor/visitors/generics/FixedFieldsVisitor.ts +0 -109
- package/src/refractor/visitors/generics/MapVisitor.ts +0 -25
- package/src/refractor/visitors/generics/MixedFieldsVisitor.ts +0 -77
- package/src/refractor/visitors/generics/PatternedFieldsVisitor.ts +0 -99
- package/src/refractor/visitors/open-api-2/BasePathVisitor.ts +0 -20
- package/src/refractor/visitors/open-api-2/ConsumesVisitor.ts +0 -29
- package/src/refractor/visitors/open-api-2/HostVisitor.ts +0 -20
- package/src/refractor/visitors/open-api-2/ProducesVisitor.ts +0 -29
- package/src/refractor/visitors/open-api-2/SchemesVisitor.ts +0 -29
- package/src/refractor/visitors/open-api-2/SecurityVisitor.ts +0 -34
- package/src/refractor/visitors/open-api-2/SwaggerVisitor.ts +0 -29
- package/src/refractor/visitors/open-api-2/TagsVisitor.ts +0 -34
- package/src/refractor/visitors/open-api-2/bases.ts +0 -82
- package/src/refractor/visitors/open-api-2/contact/index.ts +0 -27
- package/src/refractor/visitors/open-api-2/definitions/index.ts +0 -48
- package/src/refractor/visitors/open-api-2/example/index.ts +0 -27
- package/src/refractor/visitors/open-api-2/external-documentation/index.ts +0 -27
- package/src/refractor/visitors/open-api-2/header/index.ts +0 -27
- package/src/refractor/visitors/open-api-2/headers/index.ts +0 -27
- package/src/refractor/visitors/open-api-2/index.ts +0 -28
- package/src/refractor/visitors/open-api-2/info/VersionVisitor.ts +0 -21
- package/src/refractor/visitors/open-api-2/info/index.ts +0 -27
- package/src/refractor/visitors/open-api-2/items/index.ts +0 -27
- package/src/refractor/visitors/open-api-2/license/index.ts +0 -27
- package/src/refractor/visitors/open-api-2/operation/ConsumesVisitor.ts +0 -29
- package/src/refractor/visitors/open-api-2/operation/ParametersVisitor.ts +0 -44
- package/src/refractor/visitors/open-api-2/operation/ProducesVisitor.ts +0 -29
- package/src/refractor/visitors/open-api-2/operation/SchemesVisitor.ts +0 -29
- package/src/refractor/visitors/open-api-2/operation/SecurityVisitor.ts +0 -34
- package/src/refractor/visitors/open-api-2/operation/TagsVisitor.ts +0 -29
- package/src/refractor/visitors/open-api-2/operation/index.ts +0 -24
- package/src/refractor/visitors/open-api-2/parameter/index.ts +0 -27
- package/src/refractor/visitors/open-api-2/parameters-definitions/index.ts +0 -24
- package/src/refractor/visitors/open-api-2/path-item/$RefVisitor.ts +0 -20
- package/src/refractor/visitors/open-api-2/path-item/ParametersVisitor.ts +0 -44
- package/src/refractor/visitors/open-api-2/path-item/index.ts +0 -48
- package/src/refractor/visitors/open-api-2/paths/index.ts +0 -48
- package/src/refractor/visitors/open-api-2/reference/$RefVisitor.ts +0 -20
- package/src/refractor/visitors/open-api-2/reference/index.ts +0 -38
- package/src/refractor/visitors/open-api-2/response/index.ts +0 -27
- package/src/refractor/visitors/open-api-2/responses/DefaultVisitor.ts +0 -36
- package/src/refractor/visitors/open-api-2/responses/index.ts +0 -64
- package/src/refractor/visitors/open-api-2/responses-definitions/index.ts +0 -24
- package/src/refractor/visitors/open-api-2/schema/AllOfVisitor.ts +0 -35
- package/src/refractor/visitors/open-api-2/schema/ItemsVisitor.ts +0 -38
- package/src/refractor/visitors/open-api-2/schema/PropertiesVisitor.ts +0 -35
- package/src/refractor/visitors/open-api-2/schema/SchemaOrJSONReferenceVisitor.ts +0 -37
- package/src/refractor/visitors/open-api-2/schema/index.ts +0 -27
- package/src/refractor/visitors/open-api-2/scopes/index.ts +0 -27
- package/src/refractor/visitors/open-api-2/security-definitions/index.ts +0 -24
- package/src/refractor/visitors/open-api-2/security-requirement/index.ts +0 -24
- package/src/refractor/visitors/open-api-2/security-scheme/index.ts +0 -27
- package/src/refractor/visitors/open-api-2/tag/index.ts +0 -27
- package/src/refractor/visitors/open-api-2/xml/index.ts +0 -27
package/src/elements/Schema.ts
DELETED
|
@@ -1,204 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
type Attributes,
|
|
3
|
-
type Meta,
|
|
4
|
-
ArrayElement,
|
|
5
|
-
BooleanElement,
|
|
6
|
-
ObjectElement,
|
|
7
|
-
StringElement,
|
|
8
|
-
} from '@speclynx/apidom-datamodel';
|
|
9
|
-
import { UnsupportedOperationError } from '@speclynx/apidom-error';
|
|
10
|
-
import {
|
|
11
|
-
JSONReferenceElement,
|
|
12
|
-
JSONSchemaElement,
|
|
13
|
-
MediaElement,
|
|
14
|
-
LinkDescriptionElement,
|
|
15
|
-
} from '@speclynx/apidom-ns-json-schema-draft-4';
|
|
16
|
-
|
|
17
|
-
import type XmlElement from './Xml.ts';
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* @public
|
|
21
|
-
*/
|
|
22
|
-
class Schema extends JSONSchemaElement {
|
|
23
|
-
constructor(content?: Record<string, unknown>, meta?: Meta, attributes?: Attributes) {
|
|
24
|
-
super(content, meta, attributes);
|
|
25
|
-
this.element = 'schema';
|
|
26
|
-
this.classes.push('json-schema-draft-4');
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
/**
|
|
30
|
-
* Core vocabulary
|
|
31
|
-
*
|
|
32
|
-
* URI: https://tools.ietf.org/html/draft-wright-json-schema-00
|
|
33
|
-
*/
|
|
34
|
-
get idField(): StringElement | undefined {
|
|
35
|
-
throw new UnsupportedOperationError('idField getter in Schema class is not not supported.');
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
set idField(idField: StringElement | undefined) {
|
|
39
|
-
throw new UnsupportedOperationError('idField setter in Schema class is not not supported.');
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
get $schema(): StringElement | undefined {
|
|
43
|
-
throw new UnsupportedOperationError('$schema getter in Schema class is not not supported.');
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
set $schema($schema: StringElement | undefined) {
|
|
47
|
-
throw new UnsupportedOperationError('$schema setter in Schema class is not not supported.');
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
/**
|
|
51
|
-
* Validation keywords for arrays
|
|
52
|
-
*/
|
|
53
|
-
|
|
54
|
-
get additionalItems(): this | JSONReferenceElement | BooleanElement | undefined {
|
|
55
|
-
throw new UnsupportedOperationError(
|
|
56
|
-
'additionalItems getter in Schema class is not not supported.',
|
|
57
|
-
);
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
set additionalItems(additionalItems: this | JSONReferenceElement | BooleanElement | undefined) {
|
|
61
|
-
throw new UnsupportedOperationError(
|
|
62
|
-
'additionalItems setter in Schema class is not not supported.',
|
|
63
|
-
);
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
/**
|
|
67
|
-
* Validation keywords for objects
|
|
68
|
-
*/
|
|
69
|
-
|
|
70
|
-
get patternProperties(): ObjectElement | undefined {
|
|
71
|
-
throw new UnsupportedOperationError(
|
|
72
|
-
'patternProperties getter in Schema class is not not supported.',
|
|
73
|
-
);
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
set patternProperties(patternProperties: ObjectElement | undefined) {
|
|
77
|
-
throw new UnsupportedOperationError(
|
|
78
|
-
'patternProperties setter in Schema class is not not supported.',
|
|
79
|
-
);
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
get dependencies(): ObjectElement | undefined {
|
|
83
|
-
throw new UnsupportedOperationError(
|
|
84
|
-
'dependencies getter in Schema class is not not supported.',
|
|
85
|
-
);
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
set dependencies(dependencies: ObjectElement | undefined) {
|
|
89
|
-
throw new UnsupportedOperationError(
|
|
90
|
-
'dependencies setter in Schema class is not not supported.',
|
|
91
|
-
);
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
/**
|
|
95
|
-
* Validation keywords for any instance type
|
|
96
|
-
*/
|
|
97
|
-
get anyOf(): ArrayElement<this | JSONReferenceElement> | undefined {
|
|
98
|
-
throw new UnsupportedOperationError('anyOf getter in Schema class is not not supported.');
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
set anyOf(anyOf: ArrayElement<this | JSONReferenceElement> | undefined) {
|
|
102
|
-
throw new UnsupportedOperationError('anyOf setter in Schema class is not not supported.');
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
get oneOf(): ArrayElement<this | JSONReferenceElement> | undefined {
|
|
106
|
-
throw new UnsupportedOperationError('oneOf getter in Schema class is not not supported.');
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
set oneOf(oneOf: ArrayElement<this | JSONReferenceElement> | undefined) {
|
|
110
|
-
throw new UnsupportedOperationError('oneOf setter in Schema class is not not supported.');
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
get not(): this | JSONReferenceElement | undefined {
|
|
114
|
-
throw new UnsupportedOperationError('not getter in Schema class is not not supported.');
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
set not(not: this | JSONReferenceElement | undefined) {
|
|
118
|
-
throw new UnsupportedOperationError('not setter in Schema class is not not supported.');
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
get definitions(): ObjectElement | undefined {
|
|
122
|
-
throw new UnsupportedOperationError('definitions getter in Schema class is not not supported.');
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
set definitions(definitions: ObjectElement | undefined) {
|
|
126
|
-
throw new UnsupportedOperationError('definitions setter in Schema class is not not supported.');
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
/**
|
|
130
|
-
* JSON Hyper-Schema
|
|
131
|
-
*
|
|
132
|
-
* URI: https://datatracker.ietf.org/doc/html/draft-wright-json-schema-hyperschema-00
|
|
133
|
-
*/
|
|
134
|
-
|
|
135
|
-
get base(): StringElement | undefined {
|
|
136
|
-
throw new UnsupportedOperationError('base getter in Schema class is not not supported.');
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
set base(base: StringElement | undefined) {
|
|
140
|
-
throw new UnsupportedOperationError('base setter in Schema class is not not supported.');
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
get linksField(): ArrayElement<LinkDescriptionElement> | undefined {
|
|
144
|
-
throw new UnsupportedOperationError('linksField getter in Schema class is not not supported.');
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
set linksField(links: ArrayElement<LinkDescriptionElement> | undefined) {
|
|
148
|
-
throw new UnsupportedOperationError('linksField setter in Schema class is not not supported.');
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
get media(): MediaElement | undefined {
|
|
152
|
-
throw new UnsupportedOperationError('media getter in Schema class is not not supported.');
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
set media(media: MediaElement | undefined) {
|
|
156
|
-
throw new UnsupportedOperationError('media setter in Schema class is not not supported.');
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
/**
|
|
160
|
-
* OpenAPI 2.0 specific
|
|
161
|
-
*/
|
|
162
|
-
|
|
163
|
-
get xml(): XmlElement | undefined {
|
|
164
|
-
return this.get('xml') as XmlElement | undefined;
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
set xml(xml: XmlElement | undefined) {
|
|
168
|
-
this.set('xml', xml);
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
get discriminator(): StringElement | undefined {
|
|
172
|
-
return this.get('discriminator') as StringElement | undefined;
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
set discriminator(discriminator: StringElement | undefined) {
|
|
176
|
-
this.set('discriminator', discriminator);
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
get readOnly(): BooleanElement | undefined {
|
|
180
|
-
return this.get('readOnly') as BooleanElement | undefined;
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
set readOnly(readOnly: BooleanElement | undefined) {
|
|
184
|
-
this.set('readOnly', readOnly);
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
get externalDocs(): ObjectElement | undefined {
|
|
188
|
-
return this.get('externalDocs') as ObjectElement | undefined;
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
set externalDocs(externalDocs: ObjectElement | undefined) {
|
|
192
|
-
this.set('externalDocs', externalDocs);
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
get example(): unknown {
|
|
196
|
-
return this.get('example');
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
set example(example: unknown) {
|
|
200
|
-
this.set('example', example);
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
export default Schema;
|
package/src/elements/Scopes.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { ObjectElement, type Attributes, type Meta } from '@speclynx/apidom-datamodel';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* @public
|
|
5
|
-
*/
|
|
6
|
-
class Scopes extends ObjectElement {
|
|
7
|
-
constructor(content?: Record<string, unknown>, meta?: Meta, attributes?: Attributes) {
|
|
8
|
-
super(content, meta, attributes);
|
|
9
|
-
this.element = 'scopes';
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export default Scopes;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { ObjectElement, type Attributes, type Meta } from '@speclynx/apidom-datamodel';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* @public
|
|
5
|
-
*/
|
|
6
|
-
class SecurityDefinitions extends ObjectElement {
|
|
7
|
-
constructor(content?: Record<string, unknown>, meta?: Meta, attributes?: Attributes) {
|
|
8
|
-
super(content, meta, attributes);
|
|
9
|
-
this.element = 'securityDefinitions';
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export default SecurityDefinitions;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { ObjectElement, type Attributes, type Meta } from '@speclynx/apidom-datamodel';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* @public
|
|
5
|
-
*/
|
|
6
|
-
class SecurityRequirement extends ObjectElement {
|
|
7
|
-
constructor(content?: Record<string, unknown>, meta?: Meta, attributes?: Attributes) {
|
|
8
|
-
super(content, meta, attributes);
|
|
9
|
-
this.element = 'securityRequirement';
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export default SecurityRequirement;
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
ObjectElement,
|
|
3
|
-
ArrayElement,
|
|
4
|
-
StringElement,
|
|
5
|
-
type Attributes,
|
|
6
|
-
type Meta,
|
|
7
|
-
} from '@speclynx/apidom-datamodel';
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* @public
|
|
11
|
-
*/
|
|
12
|
-
class SecurityScheme extends ObjectElement {
|
|
13
|
-
constructor(content?: Record<string, unknown>, meta?: Meta, attributes?: Attributes) {
|
|
14
|
-
super(content, meta, attributes);
|
|
15
|
-
this.element = 'securityScheme';
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
get type(): StringElement | undefined {
|
|
19
|
-
return this.get('type') as StringElement | undefined;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
set type(type: StringElement | undefined) {
|
|
23
|
-
this.set('type', type);
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
get description(): StringElement | undefined {
|
|
27
|
-
return this.get('description') as StringElement | undefined;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
set description(description: StringElement | undefined) {
|
|
31
|
-
this.set('description', description);
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
get name(): StringElement | undefined {
|
|
35
|
-
return this.get('name') as StringElement | undefined;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
set name(name: StringElement | undefined) {
|
|
39
|
-
this.set('name', name);
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
get in(): StringElement | undefined {
|
|
43
|
-
return this.get('in') as StringElement | undefined;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
set in(inVal: StringElement | undefined) {
|
|
47
|
-
this.set('in', inVal);
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
get flow(): StringElement | undefined {
|
|
51
|
-
return this.get('flow') as StringElement | undefined;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
set flow(flow: StringElement | undefined) {
|
|
55
|
-
this.set('flow', flow);
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
get authorizationUrl(): StringElement | undefined {
|
|
59
|
-
return this.get('authorizationUrl') as StringElement | undefined;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
set authorizationUrl(authorizationUrl: StringElement | undefined) {
|
|
63
|
-
this.set('authorizationUrl', authorizationUrl);
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
get tokenUrl(): StringElement | undefined {
|
|
67
|
-
return this.get('tokenUrl') as StringElement | undefined;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
set tokenUrl(tokenUrl: StringElement | undefined) {
|
|
71
|
-
this.set('tokenUrl', tokenUrl);
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
get scopes(): ArrayElement | undefined {
|
|
75
|
-
return this.get('scopes') as ArrayElement | undefined;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
set scopes(scopes: ArrayElement | undefined) {
|
|
79
|
-
this.set('scopes', scopes);
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
export default SecurityScheme;
|
package/src/elements/Swagger.ts
DELETED
|
@@ -1,149 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
ObjectElement,
|
|
3
|
-
ArrayElement,
|
|
4
|
-
StringElement,
|
|
5
|
-
type Attributes,
|
|
6
|
-
type Meta,
|
|
7
|
-
} from '@speclynx/apidom-datamodel';
|
|
8
|
-
|
|
9
|
-
import SwaggerVersionElement from './SwaggerVersion.ts';
|
|
10
|
-
import InfoElement from './Info.ts';
|
|
11
|
-
import PathsElement from './Paths.ts';
|
|
12
|
-
import DefinitionsElement from './Definitions.ts';
|
|
13
|
-
import ParametersDefinitionsElement from './ParametersDefinitions.ts';
|
|
14
|
-
import ResponsesDefinitionsElement from './ResponsesDefinitions.ts';
|
|
15
|
-
import SecurityDefinitionsElement from './SecurityDefinitions.ts';
|
|
16
|
-
import ExternalDocumentationElement from './ExternalDocumentation.ts';
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* @public
|
|
20
|
-
*/
|
|
21
|
-
class Swagger extends ObjectElement {
|
|
22
|
-
constructor(content?: Record<string, unknown>, meta?: Meta, attributes?: Attributes) {
|
|
23
|
-
super(content, meta, attributes);
|
|
24
|
-
this.element = 'swagger';
|
|
25
|
-
this.classes.push('api');
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
get swagger(): SwaggerVersionElement | undefined {
|
|
29
|
-
return this.get('swagger') as SwaggerVersionElement | undefined;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
set swagger(swagger: SwaggerVersionElement | undefined) {
|
|
33
|
-
this.set('swagger', swagger);
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
get info(): InfoElement | undefined {
|
|
37
|
-
return this.get('info') as InfoElement | undefined;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
set info(info: InfoElement | undefined) {
|
|
41
|
-
this.set('info', info);
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
get host(): StringElement | undefined {
|
|
45
|
-
return this.get('host') as StringElement | undefined;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
set host(host: StringElement | undefined) {
|
|
49
|
-
this.set('host', host);
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
get basePath(): StringElement | undefined {
|
|
53
|
-
return this.get('basePath') as StringElement | undefined;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
set basePath(basePath: StringElement | undefined) {
|
|
57
|
-
this.set('basePath', basePath);
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
get schemes(): ArrayElement | undefined {
|
|
61
|
-
return this.get('schemes') as ArrayElement | undefined;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
set schemes(schemes: ArrayElement | undefined) {
|
|
65
|
-
this.set('schemes', schemes);
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
get consumes(): ArrayElement | undefined {
|
|
69
|
-
return this.get('consumes') as ArrayElement | undefined;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
set consumes(consumes: ArrayElement | undefined) {
|
|
73
|
-
this.set('consumes', consumes);
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
get produces(): ArrayElement | undefined {
|
|
77
|
-
return this.get('produces') as ArrayElement | undefined;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
set produces(produces: ArrayElement | undefined) {
|
|
81
|
-
this.set('produces', produces);
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
get paths(): PathsElement | undefined {
|
|
85
|
-
return this.get('paths') as PathsElement | undefined;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
set paths(paths: PathsElement | undefined) {
|
|
89
|
-
this.set('paths', paths);
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
get definitions(): DefinitionsElement | undefined {
|
|
93
|
-
return this.get('definitions') as DefinitionsElement | undefined;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
set definitions(definitions: DefinitionsElement | undefined) {
|
|
97
|
-
this.set('definitions', definitions);
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
get parameters(): ParametersDefinitionsElement | undefined {
|
|
101
|
-
return this.get('parameters') as ParametersDefinitionsElement | undefined;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
set parameters(parameters: ParametersDefinitionsElement | undefined) {
|
|
105
|
-
this.set('parameters', parameters);
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
get responses(): ResponsesDefinitionsElement | undefined {
|
|
109
|
-
return this.get('responses') as ResponsesDefinitionsElement | undefined;
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
set responses(responses: ResponsesDefinitionsElement | undefined) {
|
|
113
|
-
this.set('responses', responses);
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
get securityDefinitions(): SecurityDefinitionsElement | undefined {
|
|
117
|
-
return this.get('securityDefinitions') as SecurityDefinitionsElement | undefined;
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
set securityDefinitions(securityDefinitions: SecurityDefinitionsElement | undefined) {
|
|
121
|
-
this.set('securityDefinitions', securityDefinitions);
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
get security(): ArrayElement | undefined {
|
|
125
|
-
return this.get('security') as ArrayElement | undefined;
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
set security(security: ArrayElement | undefined) {
|
|
129
|
-
this.set('security', security);
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
get tags(): ArrayElement | undefined {
|
|
133
|
-
return this.get('tags') as ArrayElement | undefined;
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
set tags(tags: ArrayElement | undefined) {
|
|
137
|
-
this.set('tags', tags);
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
get externalDocs(): ExternalDocumentationElement | undefined {
|
|
141
|
-
return this.get('externalDocs') as ExternalDocumentationElement | undefined;
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
set externalDocs(externalDocs: ExternalDocumentationElement | undefined) {
|
|
145
|
-
this.set('externalDocs', externalDocs);
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
export default Swagger;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { StringElement, type Attributes, type Meta } from '@speclynx/apidom-datamodel';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* @public
|
|
5
|
-
*/
|
|
6
|
-
class SwaggerVersion extends StringElement {
|
|
7
|
-
constructor(content?: string, meta?: Meta, attributes?: Attributes) {
|
|
8
|
-
super(content, meta, attributes);
|
|
9
|
-
this.element = 'swaggerVersion';
|
|
10
|
-
this.classes.push('spec-version');
|
|
11
|
-
this.classes.push('version');
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export default SwaggerVersion;
|
package/src/elements/Tag.ts
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
ObjectElement,
|
|
3
|
-
StringElement,
|
|
4
|
-
type Attributes,
|
|
5
|
-
type Meta,
|
|
6
|
-
} from '@speclynx/apidom-datamodel';
|
|
7
|
-
|
|
8
|
-
import ExternalDocumentationElement from './ExternalDocumentation.ts';
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* @public
|
|
12
|
-
*/
|
|
13
|
-
class Tag extends ObjectElement {
|
|
14
|
-
constructor(content?: Record<string, unknown>, meta?: Meta, attributes?: Attributes) {
|
|
15
|
-
super(content, meta, attributes);
|
|
16
|
-
this.element = 'tag';
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
get name(): StringElement | undefined {
|
|
20
|
-
return this.get('name') as StringElement | undefined;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
set name(name: StringElement | undefined) {
|
|
24
|
-
this.set('name', name);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
get description(): StringElement | undefined {
|
|
28
|
-
return this.get('description') as StringElement | undefined;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
set description(description: StringElement | undefined) {
|
|
32
|
-
this.set('description', description);
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
get externalDocs(): ExternalDocumentationElement | undefined {
|
|
36
|
-
return this.get('externalDocs') as ExternalDocumentationElement | undefined;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
set externalDocs(externalDocs: ExternalDocumentationElement | undefined) {
|
|
40
|
-
this.set('externalDocs', externalDocs);
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
export default Tag;
|
package/src/elements/Xml.ts
DELETED
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
StringElement,
|
|
3
|
-
ObjectElement,
|
|
4
|
-
BooleanElement,
|
|
5
|
-
type Attributes,
|
|
6
|
-
type Meta,
|
|
7
|
-
} from '@speclynx/apidom-datamodel';
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* @public
|
|
11
|
-
*/
|
|
12
|
-
class Xml extends ObjectElement {
|
|
13
|
-
constructor(content?: Record<string, unknown>, meta?: Meta, attributes?: Attributes) {
|
|
14
|
-
super(content, meta, attributes);
|
|
15
|
-
this.element = 'xml';
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
get name(): StringElement | undefined {
|
|
19
|
-
return this.get('name') as StringElement | undefined;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
set name(name: StringElement | undefined) {
|
|
23
|
-
this.set('name', name);
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
get namespace(): StringElement | undefined {
|
|
27
|
-
return this.get('namespace') as StringElement | undefined;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
set namespace(namespace: StringElement | undefined) {
|
|
31
|
-
this.set('namespace', namespace);
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
get prefix(): StringElement | undefined {
|
|
35
|
-
return this.get('prefix') as StringElement | undefined;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
set prefix(prefix: StringElement | undefined) {
|
|
39
|
-
this.set('prefix', prefix);
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
get attribute(): BooleanElement | undefined {
|
|
43
|
-
return this.get('attribute') as BooleanElement | undefined;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
set attribute(attribute: BooleanElement | undefined) {
|
|
47
|
-
this.set('attribute', attribute);
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
get wrapped(): BooleanElement | undefined {
|
|
51
|
-
return this.get('wrapped') as BooleanElement | undefined;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
set wrapped(wrapped: BooleanElement | undefined) {
|
|
55
|
-
this.set('wrapped', wrapped);
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
export default Xml;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { ArrayElement, type Attributes, type Meta } from '@speclynx/apidom-datamodel';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* @public
|
|
5
|
-
*/
|
|
6
|
-
class OperationConsumes extends ArrayElement {
|
|
7
|
-
static primaryClass = 'operation-consumes';
|
|
8
|
-
|
|
9
|
-
constructor(content?: Array<unknown>, meta?: Meta, attributes?: Attributes) {
|
|
10
|
-
super(content, meta, attributes);
|
|
11
|
-
this.classes.push(OperationConsumes.primaryClass);
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export default OperationConsumes;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { ArrayElement, type Attributes, type Meta } from '@speclynx/apidom-datamodel';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* @public
|
|
5
|
-
*/
|
|
6
|
-
class OperationParameters extends ArrayElement {
|
|
7
|
-
static primaryClass = 'operation-parameters';
|
|
8
|
-
|
|
9
|
-
constructor(content?: Array<unknown>, meta?: Meta, attributes?: Attributes) {
|
|
10
|
-
super(content, meta, attributes);
|
|
11
|
-
this.classes.push(OperationParameters.primaryClass);
|
|
12
|
-
this.classes.push('parameters');
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export default OperationParameters;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { ArrayElement, type Attributes, type Meta } from '@speclynx/apidom-datamodel';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* @public
|
|
5
|
-
*/
|
|
6
|
-
class OperationProduces extends ArrayElement {
|
|
7
|
-
static primaryClass = 'operation-produces';
|
|
8
|
-
|
|
9
|
-
constructor(content?: Array<unknown>, meta?: Meta, attributes?: Attributes) {
|
|
10
|
-
super(content, meta, attributes);
|
|
11
|
-
this.classes.push(OperationProduces.primaryClass);
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export default OperationProduces;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { ArrayElement, type Attributes, type Meta } from '@speclynx/apidom-datamodel';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* @public
|
|
5
|
-
*/
|
|
6
|
-
class OperationSchemes extends ArrayElement {
|
|
7
|
-
static primaryClass = 'operation-schemes';
|
|
8
|
-
|
|
9
|
-
constructor(content?: Array<unknown>, meta?: Meta, attributes?: Attributes) {
|
|
10
|
-
super(content, meta, attributes);
|
|
11
|
-
this.classes.push(OperationSchemes.primaryClass);
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export default OperationSchemes;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { ArrayElement, type Attributes, type Meta } from '@speclynx/apidom-datamodel';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* @public
|
|
5
|
-
*/
|
|
6
|
-
class OperationSecurity extends ArrayElement {
|
|
7
|
-
static primaryClass = 'operation-security';
|
|
8
|
-
|
|
9
|
-
constructor(content?: Array<unknown>, meta?: Meta, attributes?: Attributes) {
|
|
10
|
-
super(content, meta, attributes);
|
|
11
|
-
this.classes.push(OperationSecurity.primaryClass);
|
|
12
|
-
this.classes.push('security');
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export default OperationSecurity;
|