@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
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { ArrayElement, type Attributes, type Meta } from '@speclynx/apidom-datamodel';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* @public
|
|
5
|
-
*/
|
|
6
|
-
class OperationTags extends ArrayElement {
|
|
7
|
-
static primaryClass = 'operation-tags';
|
|
8
|
-
|
|
9
|
-
constructor(content?: Array<unknown>, meta?: Meta, attributes?: Attributes) {
|
|
10
|
-
super(content, meta, attributes);
|
|
11
|
-
this.classes.push(OperationTags.primaryClass);
|
|
12
|
-
this.classes.push('tags');
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export default OperationTags;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { ArrayElement, type Attributes, type Meta } from '@speclynx/apidom-datamodel';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* @public
|
|
5
|
-
*/
|
|
6
|
-
class PathItemParameters extends ArrayElement {
|
|
7
|
-
static primaryClass = 'path-item-parameters';
|
|
8
|
-
|
|
9
|
-
constructor(content?: Array<unknown>, meta?: Meta, attributes?: Attributes) {
|
|
10
|
-
super(content, meta, attributes);
|
|
11
|
-
this.classes.push(PathItemParameters.primaryClass);
|
|
12
|
-
this.classes.push('parameters');
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export default PathItemParameters;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { ArrayElement, type Attributes, type Meta } from '@speclynx/apidom-datamodel';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* @public
|
|
5
|
-
*/
|
|
6
|
-
class SwaggerConsumes extends ArrayElement {
|
|
7
|
-
static primaryClass = 'swagger-consumes';
|
|
8
|
-
|
|
9
|
-
constructor(content?: Array<unknown>, meta?: Meta, attributes?: Attributes) {
|
|
10
|
-
super(content, meta, attributes);
|
|
11
|
-
this.classes.push(SwaggerConsumes.primaryClass);
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export default SwaggerConsumes;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { ArrayElement, type Attributes, type Meta } from '@speclynx/apidom-datamodel';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* @public
|
|
5
|
-
*/
|
|
6
|
-
class SwaggerProduces extends ArrayElement {
|
|
7
|
-
static primaryClass = 'swagger-produces';
|
|
8
|
-
|
|
9
|
-
constructor(content?: Array<unknown>, meta?: Meta, attributes?: Attributes) {
|
|
10
|
-
super(content, meta, attributes);
|
|
11
|
-
this.classes.push(SwaggerProduces.primaryClass);
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export default SwaggerProduces;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { ArrayElement, type Attributes, type Meta } from '@speclynx/apidom-datamodel';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* @public
|
|
5
|
-
*/
|
|
6
|
-
class SwaggerSchemes extends ArrayElement {
|
|
7
|
-
static primaryClass = 'swagger-schemes';
|
|
8
|
-
|
|
9
|
-
constructor(content?: Array<unknown>, meta?: Meta, attributes?: Attributes) {
|
|
10
|
-
super(content, meta, attributes);
|
|
11
|
-
this.classes.push(SwaggerSchemes.primaryClass);
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export default SwaggerSchemes;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { ArrayElement, type Attributes, type Meta } from '@speclynx/apidom-datamodel';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* @public
|
|
5
|
-
*/
|
|
6
|
-
class SwaggerSecurity extends ArrayElement {
|
|
7
|
-
static primaryClass = 'swagger-security';
|
|
8
|
-
|
|
9
|
-
constructor(content?: Array<unknown>, meta?: Meta, attributes?: Attributes) {
|
|
10
|
-
super(content, meta, attributes);
|
|
11
|
-
this.classes.push(SwaggerSecurity.primaryClass);
|
|
12
|
-
this.classes.push('security');
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export default SwaggerSecurity;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { ArrayElement, type Attributes, type Meta } from '@speclynx/apidom-datamodel';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* @public
|
|
5
|
-
*/
|
|
6
|
-
class SwaggerTags extends ArrayElement {
|
|
7
|
-
static primaryClass = 'swagger-tags';
|
|
8
|
-
|
|
9
|
-
constructor(content?: Array<unknown>, meta?: Meta, attributes?: Attributes) {
|
|
10
|
-
super(content, meta, attributes);
|
|
11
|
-
this.classes.push(SwaggerTags.primaryClass);
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export default SwaggerTags;
|
package/src/index.ts
DELETED
|
@@ -1,368 +0,0 @@
|
|
|
1
|
-
export {
|
|
2
|
-
isJSONReferenceElement,
|
|
3
|
-
isJSONReferenceLikeElement,
|
|
4
|
-
JSONReferenceElement,
|
|
5
|
-
refractJSONReference,
|
|
6
|
-
} from '@speclynx/apidom-ns-json-schema-draft-4';
|
|
7
|
-
|
|
8
|
-
export { default as mediaTypes, OpenAPIMediaTypes } from './media-types.ts';
|
|
9
|
-
export type { Format } from './media-types.ts';
|
|
10
|
-
|
|
11
|
-
export { default } from './namespace.ts';
|
|
12
|
-
|
|
13
|
-
export { default as refractorPluginReplaceEmptyElement } from './refractor/plugins/replace-empty-element.ts';
|
|
14
|
-
|
|
15
|
-
export {
|
|
16
|
-
default as refract,
|
|
17
|
-
refractSwagger,
|
|
18
|
-
refractInfo,
|
|
19
|
-
refractContact,
|
|
20
|
-
refractLicense,
|
|
21
|
-
refractPaths,
|
|
22
|
-
refractPathItem,
|
|
23
|
-
refractOperation,
|
|
24
|
-
refractExternalDocumentation,
|
|
25
|
-
refractParameter,
|
|
26
|
-
refractItems,
|
|
27
|
-
refractResponses,
|
|
28
|
-
refractResponse,
|
|
29
|
-
refractHeaders,
|
|
30
|
-
refractExample,
|
|
31
|
-
refractHeader,
|
|
32
|
-
refractTag,
|
|
33
|
-
refractReference,
|
|
34
|
-
refractSchema,
|
|
35
|
-
refractXml,
|
|
36
|
-
refractDefinitions,
|
|
37
|
-
refractParametersDefinitions,
|
|
38
|
-
refractResponsesDefinitions,
|
|
39
|
-
refractSecurityDefinitions,
|
|
40
|
-
refractSecurityScheme,
|
|
41
|
-
refractScopes,
|
|
42
|
-
refractSecurityRequirement,
|
|
43
|
-
} from './refractor/index.ts';
|
|
44
|
-
export type { RefractorOptions, RefractorPlugin } from './refractor/index.ts';
|
|
45
|
-
export type { Toolbox } from './refractor/toolbox.ts';
|
|
46
|
-
export { default as specificationObj } from './refractor/specification.ts';
|
|
47
|
-
|
|
48
|
-
export {
|
|
49
|
-
isSwaggerElement,
|
|
50
|
-
isSwaggerVersionElement,
|
|
51
|
-
isInfoElement,
|
|
52
|
-
isContactElement,
|
|
53
|
-
isLicenseElement,
|
|
54
|
-
isPathsElement,
|
|
55
|
-
isPathItemElement,
|
|
56
|
-
isOperationElement,
|
|
57
|
-
isExternalDocumentationElement,
|
|
58
|
-
isParameterElement,
|
|
59
|
-
isItemsElement,
|
|
60
|
-
isResponsesElement,
|
|
61
|
-
isResponseElement,
|
|
62
|
-
isHeadersElement,
|
|
63
|
-
isExampleElement,
|
|
64
|
-
isHeaderElement,
|
|
65
|
-
isTagElement,
|
|
66
|
-
isReferenceElement,
|
|
67
|
-
isSchemaElement,
|
|
68
|
-
isXmlElement,
|
|
69
|
-
isDefinitionsElement,
|
|
70
|
-
isParametersDefinitionsElement,
|
|
71
|
-
isResponsesDefinitionsElement,
|
|
72
|
-
isSecurityDefinitionsElement,
|
|
73
|
-
isSecuritySchemeElement,
|
|
74
|
-
isScopesElement,
|
|
75
|
-
isSecurityRequirementElement,
|
|
76
|
-
} from './predicates.ts';
|
|
77
|
-
|
|
78
|
-
export { isReferenceLikeElement, isSwaggerExtension } from './refractor/predicates.ts';
|
|
79
|
-
export type { ReferenceLikeElement } from './refractor/predicates.ts';
|
|
80
|
-
|
|
81
|
-
export { default as AlternatingVisitor } from './refractor/visitors/generics/AlternatingVisitor.ts';
|
|
82
|
-
export type {
|
|
83
|
-
AlternatingVisitorOptions,
|
|
84
|
-
Alternator,
|
|
85
|
-
} from './refractor/visitors/generics/AlternatingVisitor.ts';
|
|
86
|
-
export { default as FixedFieldsVisitor } from './refractor/visitors/generics/FixedFieldsVisitor.ts';
|
|
87
|
-
export type { FixedFieldsVisitorOptions } from './refractor/visitors/generics/FixedFieldsVisitor.ts';
|
|
88
|
-
export { default as MapVisitor } from './refractor/visitors/generics/MapVisitor.ts';
|
|
89
|
-
export type { MapVisitorOptions } from './refractor/visitors/generics/MapVisitor.ts';
|
|
90
|
-
export {
|
|
91
|
-
default as MixedFieldsVisitor,
|
|
92
|
-
MixedFieldsVisitorBase,
|
|
93
|
-
} from './refractor/visitors/generics/MixedFieldsVisitor.ts';
|
|
94
|
-
export type { MixedFieldsVisitorOptions } from './refractor/visitors/generics/MixedFieldsVisitor.ts';
|
|
95
|
-
export { default as PatternedFieldsVisitor } from './refractor/visitors/generics/PatternedFieldsVisitor.ts';
|
|
96
|
-
export type { PatternedFieldsVisitorOptions } from './refractor/visitors/generics/PatternedFieldsVisitor.ts';
|
|
97
|
-
export { default as FallbackVisitor } from './refractor/visitors/FallbackVisitor.ts';
|
|
98
|
-
export type { FallbackVisitorOptions } from './refractor/visitors/FallbackVisitor.ts';
|
|
99
|
-
export { default as SpecificationVisitor } from './refractor/visitors/SpecificationVisitor.ts';
|
|
100
|
-
export type { SpecificationVisitorOptions } from './refractor/visitors/SpecificationVisitor.ts';
|
|
101
|
-
export { default as Visitor } from './refractor/visitors/Visitor.ts';
|
|
102
|
-
export type { VisitorOptions } from './refractor/visitors/Visitor.ts';
|
|
103
|
-
|
|
104
|
-
export type {
|
|
105
|
-
default as ContactVisitor,
|
|
106
|
-
ContactVisitorOptions,
|
|
107
|
-
} from './refractor/visitors/open-api-2/contact/index.ts';
|
|
108
|
-
export type {
|
|
109
|
-
default as DefinitionsVisitor,
|
|
110
|
-
DefinitionsVisitorOptions,
|
|
111
|
-
} from './refractor/visitors/open-api-2/definitions/index.ts';
|
|
112
|
-
export type {
|
|
113
|
-
default as ExampleVisitor,
|
|
114
|
-
ExampleVisitorOptions,
|
|
115
|
-
} from './refractor/visitors/open-api-2/example/index.ts';
|
|
116
|
-
export type {
|
|
117
|
-
default as ExternalDocumentationVisitor,
|
|
118
|
-
ExternalDocumentationVisitorOptions,
|
|
119
|
-
} from './refractor/visitors/open-api-2/external-documentation/index.ts';
|
|
120
|
-
export type {
|
|
121
|
-
default as HeaderVisitor,
|
|
122
|
-
HeaderVisitorOptions,
|
|
123
|
-
} from './refractor/visitors/open-api-2/header/index.ts';
|
|
124
|
-
export type {
|
|
125
|
-
default as HeadersVisitor,
|
|
126
|
-
HeadersVisitorOptions,
|
|
127
|
-
} from './refractor/visitors/open-api-2/headers/index.ts';
|
|
128
|
-
export type {
|
|
129
|
-
default as InfoVisitor,
|
|
130
|
-
InfoVisitorOptions,
|
|
131
|
-
} from './refractor/visitors/open-api-2/info/index.ts';
|
|
132
|
-
export type {
|
|
133
|
-
default as InfoVersionVisitor,
|
|
134
|
-
VersionVisitorOptions as InfoVersionVisitorOptions,
|
|
135
|
-
} from './refractor/visitors/open-api-2/info/VersionVisitor.ts';
|
|
136
|
-
export type {
|
|
137
|
-
default as ItemsVisitor,
|
|
138
|
-
ItemsVisitorOptions,
|
|
139
|
-
} from './refractor/visitors/open-api-2/items/index.ts';
|
|
140
|
-
export type {
|
|
141
|
-
default as LicenseVisitor,
|
|
142
|
-
LicenseVisitorOptions,
|
|
143
|
-
} from './refractor/visitors/open-api-2/license/index.ts';
|
|
144
|
-
export type {
|
|
145
|
-
default as OperationVisitor,
|
|
146
|
-
OperationVisitorOptions,
|
|
147
|
-
} from './refractor/visitors/open-api-2/operation/index.ts';
|
|
148
|
-
export type {
|
|
149
|
-
default as OperationConsumesVisitor,
|
|
150
|
-
ConsumesVisitorOptions as OperationConsumesVisitorOptions,
|
|
151
|
-
} from './refractor/visitors/open-api-2/operation/ConsumesVisitor.ts';
|
|
152
|
-
export type {
|
|
153
|
-
default as OperationParametersVisitor,
|
|
154
|
-
ParametersVisitorOptions as OperationParametersVisitorOptions,
|
|
155
|
-
} from './refractor/visitors/open-api-2/operation/ParametersVisitor.ts';
|
|
156
|
-
export type {
|
|
157
|
-
default as OperationProducesVisitor,
|
|
158
|
-
ProducesVisitorOptions as OperationProducesVisitorOptions,
|
|
159
|
-
} from './refractor/visitors/open-api-2/operation/ProducesVisitor.ts';
|
|
160
|
-
export type {
|
|
161
|
-
default as OperationSchemesVisitor,
|
|
162
|
-
SchemesVisitorOptions as OperationSchemesVisitorOptions,
|
|
163
|
-
} from './refractor/visitors/open-api-2/operation/SchemesVisitor.ts';
|
|
164
|
-
export type {
|
|
165
|
-
default as OperationSecurityVisitor,
|
|
166
|
-
SecurityVisitorOptions as OperationSecurityVisitorOptions,
|
|
167
|
-
} from './refractor/visitors/open-api-2/operation/SecurityVisitor.ts';
|
|
168
|
-
export type {
|
|
169
|
-
default as OperationTagsVisitor,
|
|
170
|
-
TagsVisitorOptions as OperationTagsVisitorOptions,
|
|
171
|
-
} from './refractor/visitors/open-api-2/operation/TagsVisitor.ts';
|
|
172
|
-
export type {
|
|
173
|
-
default as ParameterVisitor,
|
|
174
|
-
ParameterVisitorOptions,
|
|
175
|
-
} from './refractor/visitors/open-api-2/parameter/index.ts';
|
|
176
|
-
export type {
|
|
177
|
-
default as ParametersDefinitionsVisitor,
|
|
178
|
-
ParametersDefinitionsVisitorOptions,
|
|
179
|
-
} from './refractor/visitors/open-api-2/parameters-definitions/index.ts';
|
|
180
|
-
export type {
|
|
181
|
-
default as PathItemVisitor,
|
|
182
|
-
PathItemVisitorOptions,
|
|
183
|
-
} from './refractor/visitors/open-api-2/path-item/index.ts';
|
|
184
|
-
export type {
|
|
185
|
-
default as PathItem$RefVisitor,
|
|
186
|
-
$RefVisitorOptions as PathItem$RefVisitorOptions,
|
|
187
|
-
} from './refractor/visitors/open-api-2/path-item/$RefVisitor.ts';
|
|
188
|
-
export type {
|
|
189
|
-
default as PathItemParametersVisitor,
|
|
190
|
-
ParametersVisitorOptions as PathItemParametersVisitorOptions,
|
|
191
|
-
} from './refractor/visitors/open-api-2/path-item/ParametersVisitor.ts';
|
|
192
|
-
export type {
|
|
193
|
-
default as PathsVisitor,
|
|
194
|
-
PathsVisitorOptions,
|
|
195
|
-
} from './refractor/visitors/open-api-2/paths/index.ts';
|
|
196
|
-
export type {
|
|
197
|
-
default as ReferenceVisitor,
|
|
198
|
-
ReferenceVisitorOptions,
|
|
199
|
-
} from './refractor/visitors/open-api-2/reference/index.ts';
|
|
200
|
-
export type {
|
|
201
|
-
default as Reference$RefVisitor,
|
|
202
|
-
$RefVisitorOptions as Reference$RefVisitorOptions,
|
|
203
|
-
} from './refractor/visitors/open-api-2/reference/$RefVisitor.ts';
|
|
204
|
-
export type {
|
|
205
|
-
default as ResponseVisitor,
|
|
206
|
-
ResponseVisitorOptions,
|
|
207
|
-
} from './refractor/visitors/open-api-2/response/index.ts';
|
|
208
|
-
export type {
|
|
209
|
-
default as ResponsesVisitor,
|
|
210
|
-
ResponsesVisitorOptions,
|
|
211
|
-
} from './refractor/visitors/open-api-2/responses/index.ts';
|
|
212
|
-
export type {
|
|
213
|
-
default as ResponsesDefaultVisitor,
|
|
214
|
-
DefaultVisitorOptions as ResponsesDefaultVisitorOptions,
|
|
215
|
-
} from './refractor/visitors/open-api-2/responses/DefaultVisitor.ts';
|
|
216
|
-
export type {
|
|
217
|
-
default as ResponsesDefinitionsVisitor,
|
|
218
|
-
ResponsesDefinitionsVisitorOptions,
|
|
219
|
-
} from './refractor/visitors/open-api-2/responses-definitions/index.ts';
|
|
220
|
-
export type {
|
|
221
|
-
default as SchemaVisitor,
|
|
222
|
-
SchemaVisitorOptions,
|
|
223
|
-
} from './refractor/visitors/open-api-2/schema/index.ts';
|
|
224
|
-
export type {
|
|
225
|
-
default as SchemaAllOfVisitor,
|
|
226
|
-
AllOfVisitorOptions as SchemaAllOfVisitorOptions,
|
|
227
|
-
JSONSchemaAllOfVisitor,
|
|
228
|
-
} from './refractor/visitors/open-api-2/schema/AllOfVisitor.ts';
|
|
229
|
-
export type {
|
|
230
|
-
default as SchemaItemsVisitor,
|
|
231
|
-
ItemsVisitorOptions as SchemaItemsVisitorOptions,
|
|
232
|
-
JSONSchemaItemsVisitor,
|
|
233
|
-
} from './refractor/visitors/open-api-2/schema/ItemsVisitor.ts';
|
|
234
|
-
export type {
|
|
235
|
-
default as SchemaPropertiesVisitor,
|
|
236
|
-
PropertiesVisitorOptions as SchemaPropertiesVisitorOptions,
|
|
237
|
-
JSONSchemaPropertiesVisitor,
|
|
238
|
-
} from './refractor/visitors/open-api-2/schema/PropertiesVisitor.ts';
|
|
239
|
-
export type {
|
|
240
|
-
default as SchemaOrJSONReferenceVisitor,
|
|
241
|
-
SchemaOrReferenceVisitorOptions as SchemaOrJSONReferenceVisitorOptions,
|
|
242
|
-
JSONSchemaOrJSONReferenceVisitor,
|
|
243
|
-
} from './refractor/visitors/open-api-2/schema/SchemaOrJSONReferenceVisitor.ts';
|
|
244
|
-
export type {
|
|
245
|
-
default as ScopesVisitor,
|
|
246
|
-
ScopesVisitorOptions,
|
|
247
|
-
} from './refractor/visitors/open-api-2/scopes/index.ts';
|
|
248
|
-
export type {
|
|
249
|
-
default as SecurityDefinitionsVisitor,
|
|
250
|
-
SecurityDefinitionsVisitorOptions,
|
|
251
|
-
} from './refractor/visitors/open-api-2/security-definitions/index.ts';
|
|
252
|
-
export type {
|
|
253
|
-
default as SecurityRequirementVisitor,
|
|
254
|
-
SecurityRequirementVisitorOptions,
|
|
255
|
-
} from './refractor/visitors/open-api-2/security-requirement/index.ts';
|
|
256
|
-
export type {
|
|
257
|
-
default as SecuritySchemeVisitor,
|
|
258
|
-
SecuritySchemeVisitorOptions,
|
|
259
|
-
} from './refractor/visitors/open-api-2/security-scheme/index.ts';
|
|
260
|
-
export type {
|
|
261
|
-
default as TagVisitor,
|
|
262
|
-
TagVisitorOptions,
|
|
263
|
-
} from './refractor/visitors/open-api-2/tag/index.ts';
|
|
264
|
-
export type {
|
|
265
|
-
default as XmlVisitor,
|
|
266
|
-
XmlVisitorOptions,
|
|
267
|
-
} from './refractor/visitors/open-api-2/xml/index.ts';
|
|
268
|
-
export type {
|
|
269
|
-
default as SwaggerVisitor,
|
|
270
|
-
SwaggerVisitorOptions,
|
|
271
|
-
} from './refractor/visitors/open-api-2/index.ts';
|
|
272
|
-
export type {
|
|
273
|
-
default as BasePathVisitor,
|
|
274
|
-
BasePathVisitorOptions,
|
|
275
|
-
} from './refractor/visitors/open-api-2/BasePathVisitor.ts';
|
|
276
|
-
export type {
|
|
277
|
-
default as ConsumesVisitor,
|
|
278
|
-
ConsumesVisitorOptions,
|
|
279
|
-
} from './refractor/visitors/open-api-2/ConsumesVisitor.ts';
|
|
280
|
-
export type {
|
|
281
|
-
default as HostVisitor,
|
|
282
|
-
HostVisitorOptions,
|
|
283
|
-
} from './refractor/visitors/open-api-2/HostVisitor.ts';
|
|
284
|
-
export type {
|
|
285
|
-
default as ProducesVisitor,
|
|
286
|
-
ProducesVisitorOptions,
|
|
287
|
-
} from './refractor/visitors/open-api-2/ProducesVisitor.ts';
|
|
288
|
-
export type {
|
|
289
|
-
default as SchemesVisitor,
|
|
290
|
-
SchemesVisitorOptions,
|
|
291
|
-
} from './refractor/visitors/open-api-2/SchemesVisitor.ts';
|
|
292
|
-
export type {
|
|
293
|
-
default as SecurityVisitor,
|
|
294
|
-
SecurityVisitorOptions,
|
|
295
|
-
} from './refractor/visitors/open-api-2/SecurityVisitor.ts';
|
|
296
|
-
export type {
|
|
297
|
-
default as SwaggerVersionVisitor,
|
|
298
|
-
SwaggerVisitorOptions as SwaggerVersionVisitorOptions,
|
|
299
|
-
} from './refractor/visitors/open-api-2/SwaggerVisitor.ts';
|
|
300
|
-
export type { default as SpecificationExtensionVisitor } from './refractor/visitors/SpecificationExtensionVisitor.ts';
|
|
301
|
-
export type {
|
|
302
|
-
default as TagsVisitor,
|
|
303
|
-
TagsVisitorOptions,
|
|
304
|
-
} from './refractor/visitors/open-api-2/TagsVisitor.ts';
|
|
305
|
-
|
|
306
|
-
export type { SpecPath } from './refractor/visitors/generics/FixedFieldsVisitor.ts';
|
|
307
|
-
|
|
308
|
-
// Base visitor classes (Mixin combinations)
|
|
309
|
-
export {
|
|
310
|
-
BaseSpecificationVisitor,
|
|
311
|
-
BaseFixedFieldsVisitor,
|
|
312
|
-
BasePatternedFieldsVisitor,
|
|
313
|
-
BaseMapVisitor,
|
|
314
|
-
BaseAlternatingVisitor,
|
|
315
|
-
BaseMixedFieldsVisitor,
|
|
316
|
-
} from './refractor/visitors/open-api-2/bases.ts';
|
|
317
|
-
export type {
|
|
318
|
-
BaseSpecificationVisitorOptions,
|
|
319
|
-
BaseFixedFieldsVisitorOptions,
|
|
320
|
-
BasePatternedFieldsVisitorOptions,
|
|
321
|
-
BaseMapVisitorOptions,
|
|
322
|
-
BaseAlternatingVisitorOptions,
|
|
323
|
-
BaseMixedFieldsVisitorOptions,
|
|
324
|
-
} from './refractor/visitors/open-api-2/bases.ts';
|
|
325
|
-
|
|
326
|
-
// OpenAPI 2.0 elements
|
|
327
|
-
export {
|
|
328
|
-
SwaggerElement,
|
|
329
|
-
SwaggerVersionElement,
|
|
330
|
-
InfoElement,
|
|
331
|
-
ContactElement,
|
|
332
|
-
LicenseElement,
|
|
333
|
-
PathsElement,
|
|
334
|
-
PathItemElement,
|
|
335
|
-
OperationElement,
|
|
336
|
-
ExternalDocumentationElement,
|
|
337
|
-
ParameterElement,
|
|
338
|
-
ItemsElement,
|
|
339
|
-
ResponsesElement,
|
|
340
|
-
ResponseElement,
|
|
341
|
-
HeadersElement,
|
|
342
|
-
ExampleElement,
|
|
343
|
-
HeaderElement,
|
|
344
|
-
TagElement,
|
|
345
|
-
ReferenceElement,
|
|
346
|
-
SchemaElement,
|
|
347
|
-
XmlElement,
|
|
348
|
-
DefinitionsElement,
|
|
349
|
-
ParametersDefinitionsElement,
|
|
350
|
-
ResponsesDefinitionsElement,
|
|
351
|
-
SecurityDefinitionsElement,
|
|
352
|
-
SecuritySchemeElement,
|
|
353
|
-
ScopesElement,
|
|
354
|
-
SecurityRequirementElement,
|
|
355
|
-
} from './refractor/inspect.ts';
|
|
356
|
-
// NCE types
|
|
357
|
-
export { default as OperationConsumesElement } from './elements/nces/OperationConsumes.ts';
|
|
358
|
-
export { default as OperationParametersElement } from './elements/nces/OperationParameters.ts';
|
|
359
|
-
export { default as OperationProducesElement } from './elements/nces/OperationProduces.ts';
|
|
360
|
-
export { default as OperationSchemesElement } from './elements/nces/OperationSchemes.ts';
|
|
361
|
-
export { default as OperationSecurityElement } from './elements/nces/OperationSecurity.ts';
|
|
362
|
-
export { default as OperationTagsElement } from './elements/nces/OperationTags.ts';
|
|
363
|
-
export { default as PathItemParametersElement } from './elements/nces/PathItemParameters.ts';
|
|
364
|
-
export { default as SwaggerSchemesElement } from './elements/nces/SwaggerSchemes.ts';
|
|
365
|
-
export { default as SwaggerConsumesElement } from './elements/nces/SwaggerConsumes.ts';
|
|
366
|
-
export { default as SwaggerProducesElement } from './elements/nces/SwaggerProduces.ts';
|
|
367
|
-
export { default as SwaggerSecurityElement } from './elements/nces/SwaggerSecurity.ts';
|
|
368
|
-
export { default as SwaggerTagsElement } from './elements/nces/SwaggerTags.ts';
|
package/src/media-types.ts
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { last } from 'ramda';
|
|
2
|
-
import { MediaTypes } from '@speclynx/apidom-core';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* @public
|
|
6
|
-
*/
|
|
7
|
-
export type Format = 'generic' | 'json' | 'yaml';
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* @public
|
|
11
|
-
*/
|
|
12
|
-
export class OpenAPIMediaTypes extends MediaTypes<string> {
|
|
13
|
-
filterByFormat(format: Format = 'generic') {
|
|
14
|
-
const effectiveFormat = format === 'generic' ? 'openapi;version' : format;
|
|
15
|
-
return this.filter((mediaType) => mediaType.includes(effectiveFormat));
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
findBy(version = '2.0', format: Format = 'generic') {
|
|
19
|
-
const search =
|
|
20
|
-
format === 'generic'
|
|
21
|
-
? `vnd.oai.openapi;version=${version}`
|
|
22
|
-
: `vnd.oai.openapi+${format};version=${version}`;
|
|
23
|
-
const found = this.find((mediaType) => mediaType.includes(search));
|
|
24
|
-
|
|
25
|
-
return found || this.unknownMediaType;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
latest(format: Format = 'generic') {
|
|
29
|
-
return last(this.filterByFormat(format)) as string;
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* @public
|
|
35
|
-
*/
|
|
36
|
-
const mediaTypes = new OpenAPIMediaTypes(
|
|
37
|
-
'application/vnd.oai.openapi;version=2.0',
|
|
38
|
-
'application/vnd.oai.openapi+json;version=2.0',
|
|
39
|
-
'application/vnd.oai.openapi+yaml;version=2.0',
|
|
40
|
-
);
|
|
41
|
-
|
|
42
|
-
export default mediaTypes;
|
package/src/namespace.ts
DELETED
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
import { NamespacePlugin } from '@speclynx/apidom-datamodel';
|
|
2
|
-
|
|
3
|
-
import SwaggerElement from './elements/Swagger.ts';
|
|
4
|
-
import SwaggerVersionElement from './elements/SwaggerVersion.ts';
|
|
5
|
-
import InfoElement from './elements/Info.ts';
|
|
6
|
-
import ContactElement from './elements/Contact.ts';
|
|
7
|
-
import LicenseElement from './elements/License.ts';
|
|
8
|
-
import PathsElement from './elements/Paths.ts';
|
|
9
|
-
import PathItemElement from './elements/PathItem.ts';
|
|
10
|
-
import OperationElement from './elements/Operation.ts';
|
|
11
|
-
import ExternalDocumentationElement from './elements/ExternalDocumentation.ts';
|
|
12
|
-
import ParameterElement from './elements/Parameter.ts';
|
|
13
|
-
import ItemsElement from './elements/Items.ts';
|
|
14
|
-
import ExampleElement from './elements/Example.ts';
|
|
15
|
-
import ResponsesElement from './elements/Responses.ts';
|
|
16
|
-
import ResponseElement from './elements/Response.ts';
|
|
17
|
-
import HeadersElement from './elements/Headers.ts';
|
|
18
|
-
import HeaderElement from './elements/Header.ts';
|
|
19
|
-
import TagElement from './elements/Tag.ts';
|
|
20
|
-
import SchemaElement from './elements/Schema.ts';
|
|
21
|
-
import XmlElement from './elements/Xml.ts';
|
|
22
|
-
import ReferenceElement from './elements/Reference.ts';
|
|
23
|
-
import DefinitionsElement from './elements/Definitions.ts';
|
|
24
|
-
import ParametersDefinitionsElement from './elements/ParametersDefinitions.ts';
|
|
25
|
-
import ResponsesDefinitionsElement from './elements/ResponsesDefinitions.ts';
|
|
26
|
-
import SecurityDefinitionsElement from './elements/SecurityDefinitions.ts';
|
|
27
|
-
import SecuritySchemeElement from './elements/SecurityScheme.ts';
|
|
28
|
-
import ScopesElement from './elements/Scopes.ts';
|
|
29
|
-
import SecurityRequirementElement from './elements/SecurityRequirement.ts';
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
* @public
|
|
33
|
-
*/
|
|
34
|
-
const openApi2: NamespacePlugin = {
|
|
35
|
-
namespace: (options) => {
|
|
36
|
-
const { base } = options;
|
|
37
|
-
|
|
38
|
-
base.register('swagger', SwaggerElement);
|
|
39
|
-
base.register('swaggerVersion', SwaggerVersionElement);
|
|
40
|
-
base.register('info', InfoElement);
|
|
41
|
-
base.register('contact', ContactElement);
|
|
42
|
-
base.register('license', LicenseElement);
|
|
43
|
-
base.register('paths', PathsElement);
|
|
44
|
-
base.register('pathItem', PathItemElement);
|
|
45
|
-
base.register('operation', OperationElement);
|
|
46
|
-
base.register('externalDocumentation', ExternalDocumentationElement);
|
|
47
|
-
base.register('parameter', ParameterElement);
|
|
48
|
-
base.register('items', ItemsElement);
|
|
49
|
-
base.register('responses', ResponsesElement);
|
|
50
|
-
base.register('response', ResponseElement);
|
|
51
|
-
base.register('headers', HeadersElement);
|
|
52
|
-
base.register('example', ExampleElement);
|
|
53
|
-
base.register('header', HeaderElement);
|
|
54
|
-
base.register('tag', TagElement);
|
|
55
|
-
base.register('reference', ReferenceElement);
|
|
56
|
-
base.register('schema', SchemaElement);
|
|
57
|
-
base.register('xml', XmlElement);
|
|
58
|
-
base.register('definitions', DefinitionsElement);
|
|
59
|
-
base.register('parametersDefinitions', ParametersDefinitionsElement);
|
|
60
|
-
base.register('responsesDefinitions', ResponsesDefinitionsElement);
|
|
61
|
-
base.register('securityDefinitions', SecurityDefinitionsElement);
|
|
62
|
-
base.register('securityScheme', SecuritySchemeElement);
|
|
63
|
-
base.register('scopes', ScopesElement);
|
|
64
|
-
base.register('securityRequirement', SecurityRequirementElement);
|
|
65
|
-
|
|
66
|
-
return base;
|
|
67
|
-
},
|
|
68
|
-
};
|
|
69
|
-
|
|
70
|
-
export default openApi2;
|