@swagger-api/apidom-ns-openapi-2 0.79.0
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 +24 -0
- package/LICENSES/Apache-2.0.txt +202 -0
- package/LICENSES/MIT.txt +9 -0
- package/NOTICE +57 -0
- package/README.md +215 -0
- package/cjs/elements/Contact.cjs +30 -0
- package/cjs/elements/Definitions.cjs +12 -0
- package/cjs/elements/Example.cjs +12 -0
- package/cjs/elements/ExternalDocumentation.cjs +24 -0
- package/cjs/elements/Header.cjs +184 -0
- package/cjs/elements/Headers.cjs +12 -0
- package/cjs/elements/Info.cjs +49 -0
- package/cjs/elements/Items.cjs +189 -0
- package/cjs/elements/License.cjs +24 -0
- package/cjs/elements/Operation.cjs +75 -0
- package/cjs/elements/Parameter.cjs +229 -0
- package/cjs/elements/ParametersDefinitions.cjs +12 -0
- package/cjs/elements/PathItem.cjs +66 -0
- package/cjs/elements/Paths.cjs +12 -0
- package/cjs/elements/Reference.cjs +19 -0
- package/cjs/elements/Response.cjs +36 -0
- package/cjs/elements/Responses.cjs +18 -0
- package/cjs/elements/ResponsesDefinitions.cjs +12 -0
- package/cjs/elements/Schema.cjs +115 -0
- package/cjs/elements/Scopes.cjs +12 -0
- package/cjs/elements/SecurityDefinitions.cjs +12 -0
- package/cjs/elements/SecurityRequirement.cjs +12 -0
- package/cjs/elements/SecurityScheme.cjs +60 -0
- package/cjs/elements/Swagger.cjs +103 -0
- package/cjs/elements/SwaggerVersion.cjs +14 -0
- package/cjs/elements/Tag.cjs +30 -0
- package/cjs/elements/Xml.cjs +42 -0
- package/cjs/elements/nces/OperationConsumes.cjs +13 -0
- package/cjs/elements/nces/OperationParameters.cjs +14 -0
- package/cjs/elements/nces/OperationProduces.cjs +13 -0
- package/cjs/elements/nces/OperationSchemes.cjs +13 -0
- package/cjs/elements/nces/OperationSecurity.cjs +14 -0
- package/cjs/elements/nces/OperationTags.cjs +13 -0
- package/cjs/elements/nces/PathItemParameters.cjs +14 -0
- package/cjs/elements/nces/SwaggerConsumes.cjs +13 -0
- package/cjs/elements/nces/SwaggerProduces.cjs +13 -0
- package/cjs/elements/nces/SwaggerSchemes.cjs +13 -0
- package/cjs/elements/nces/SwaggerSecurity.cjs +14 -0
- package/cjs/elements/nces/SwaggerTags.cjs +13 -0
- package/cjs/index.cjs +134 -0
- package/cjs/media-types.cjs +23 -0
- package/cjs/namespace.cjs +68 -0
- package/cjs/predicates.cjs +222 -0
- package/cjs/refractor/index.cjs +47 -0
- package/cjs/refractor/plugins/replace-empty-element.cjs +365 -0
- package/cjs/refractor/predicates.cjs +14 -0
- package/cjs/refractor/registration.cjs +87 -0
- package/cjs/refractor/specification.cjs +488 -0
- package/cjs/refractor/toolbox.cjs +23 -0
- package/cjs/refractor/visitors/FallbackVisitor.cjs +23 -0
- package/cjs/refractor/visitors/SpecificationExtensionVisitor.cjs +18 -0
- package/cjs/refractor/visitors/SpecificationVisitor.cjs +87 -0
- package/cjs/refractor/visitors/Visitor.cjs +22 -0
- package/cjs/refractor/visitors/generics/AlternatingVisitor.cjs +27 -0
- package/cjs/refractor/visitors/generics/FixedFieldsVisitor.cjs +56 -0
- package/cjs/refractor/visitors/generics/MapVisitor.cjs +14 -0
- package/cjs/refractor/visitors/generics/MixedFieldsVisitor.cjs +42 -0
- package/cjs/refractor/visitors/generics/PatternedFieldsVisitor.cjs +58 -0
- package/cjs/refractor/visitors/open-api-2/ConsumesVisitor.cjs +21 -0
- package/cjs/refractor/visitors/open-api-2/ProducesVisitor.cjs +21 -0
- package/cjs/refractor/visitors/open-api-2/SchemesVisitor.cjs +21 -0
- package/cjs/refractor/visitors/open-api-2/SecurityVisitor.cjs +27 -0
- package/cjs/refractor/visitors/open-api-2/SwaggerVisitor.cjs +21 -0
- package/cjs/refractor/visitors/open-api-2/TagsVisitor.cjs +27 -0
- package/cjs/refractor/visitors/open-api-2/contact/index.cjs +20 -0
- package/cjs/refractor/visitors/open-api-2/definitions/index.cjs +33 -0
- package/cjs/refractor/visitors/open-api-2/example/index.cjs +20 -0
- package/cjs/refractor/visitors/open-api-2/external-documentation/index.cjs +20 -0
- package/cjs/refractor/visitors/open-api-2/header/index.cjs +20 -0
- package/cjs/refractor/visitors/open-api-2/headers/index.cjs +20 -0
- package/cjs/refractor/visitors/open-api-2/index.cjs +20 -0
- package/cjs/refractor/visitors/open-api-2/info/VersionVisitor.cjs +19 -0
- package/cjs/refractor/visitors/open-api-2/info/index.cjs +20 -0
- package/cjs/refractor/visitors/open-api-2/items/index.cjs +20 -0
- package/cjs/refractor/visitors/open-api-2/license/index.cjs +20 -0
- package/cjs/refractor/visitors/open-api-2/operation/ConsumesVisitor.cjs +21 -0
- package/cjs/refractor/visitors/open-api-2/operation/ParametersVisitor.cjs +32 -0
- package/cjs/refractor/visitors/open-api-2/operation/ProducesVisitor.cjs +21 -0
- package/cjs/refractor/visitors/open-api-2/operation/SchemesVisitor.cjs +21 -0
- package/cjs/refractor/visitors/open-api-2/operation/SecurityVisitor.cjs +27 -0
- package/cjs/refractor/visitors/open-api-2/operation/TagsVisitor.cjs +21 -0
- package/cjs/refractor/visitors/open-api-2/operation/index.cjs +19 -0
- package/cjs/refractor/visitors/open-api-2/parameter/index.cjs +20 -0
- package/cjs/refractor/visitors/open-api-2/parameters-definitions/index.cjs +19 -0
- package/cjs/refractor/visitors/open-api-2/path-item/$RefVisitor.cjs +18 -0
- package/cjs/refractor/visitors/open-api-2/path-item/ParametersVisitor.cjs +32 -0
- package/cjs/refractor/visitors/open-api-2/path-item/index.cjs +40 -0
- package/cjs/refractor/visitors/open-api-2/paths/index.cjs +35 -0
- package/cjs/refractor/visitors/open-api-2/reference/$RefVisitor.cjs +18 -0
- package/cjs/refractor/visitors/open-api-2/reference/index.cjs +33 -0
- package/cjs/refractor/visitors/open-api-2/response/index.cjs +20 -0
- package/cjs/refractor/visitors/open-api-2/responses/DefaultVisitor.cjs +37 -0
- package/cjs/refractor/visitors/open-api-2/responses/index.cjs +46 -0
- package/cjs/refractor/visitors/open-api-2/responses-definitions/index.cjs +19 -0
- package/cjs/refractor/visitors/open-api-2/schema/AllOfVisitor.cjs +23 -0
- package/cjs/refractor/visitors/open-api-2/schema/ItemsVisitor.cjs +31 -0
- package/cjs/refractor/visitors/open-api-2/schema/PropertiesVisitor.cjs +23 -0
- package/cjs/refractor/visitors/open-api-2/schema/SchemaOrJSONReferenceVisitor.cjs +23 -0
- package/cjs/refractor/visitors/open-api-2/schema/index.cjs +20 -0
- package/cjs/refractor/visitors/open-api-2/scopes/index.cjs +20 -0
- package/cjs/refractor/visitors/open-api-2/security-definitions/index.cjs +19 -0
- package/cjs/refractor/visitors/open-api-2/security-requirement/index.cjs +19 -0
- package/cjs/refractor/visitors/open-api-2/security-scheme/index.cjs +20 -0
- package/cjs/refractor/visitors/open-api-2/tag/index.cjs +20 -0
- package/cjs/refractor/visitors/open-api-2/xml/index.cjs +20 -0
- package/cjs/traversal/visitor.cjs +53 -0
- package/dist/apidom-ns-openapi-2.browser.js +25296 -0
- package/dist/apidom-ns-openapi-2.browser.min.js +1 -0
- package/es/elements/Contact.mjs +26 -0
- package/es/elements/Definitions.mjs +8 -0
- package/es/elements/Example.mjs +8 -0
- package/es/elements/ExternalDocumentation.mjs +20 -0
- package/es/elements/Header.mjs +182 -0
- package/es/elements/Headers.mjs +8 -0
- package/es/elements/Info.mjs +45 -0
- package/es/elements/Items.mjs +187 -0
- package/es/elements/License.mjs +20 -0
- package/es/elements/Operation.mjs +71 -0
- package/es/elements/Parameter.mjs +226 -0
- package/es/elements/ParametersDefinitions.mjs +8 -0
- package/es/elements/PathItem.mjs +62 -0
- package/es/elements/Paths.mjs +8 -0
- package/es/elements/Reference.mjs +15 -0
- package/es/elements/Response.mjs +32 -0
- package/es/elements/Responses.mjs +14 -0
- package/es/elements/ResponsesDefinitions.mjs +8 -0
- package/es/elements/Schema.mjs +113 -0
- package/es/elements/Scopes.mjs +8 -0
- package/es/elements/SecurityDefinitions.mjs +8 -0
- package/es/elements/SecurityRequirement.mjs +8 -0
- package/es/elements/SecurityScheme.mjs +56 -0
- package/es/elements/Swagger.mjs +99 -0
- package/es/elements/SwaggerVersion.mjs +10 -0
- package/es/elements/Tag.mjs +26 -0
- package/es/elements/Xml.mjs +38 -0
- package/es/elements/nces/OperationConsumes.mjs +9 -0
- package/es/elements/nces/OperationParameters.mjs +10 -0
- package/es/elements/nces/OperationProduces.mjs +9 -0
- package/es/elements/nces/OperationSchemes.mjs +9 -0
- package/es/elements/nces/OperationSecurity.mjs +10 -0
- package/es/elements/nces/OperationTags.mjs +9 -0
- package/es/elements/nces/PathItemParameters.mjs +10 -0
- package/es/elements/nces/SwaggerConsumes.mjs +9 -0
- package/es/elements/nces/SwaggerProduces.mjs +9 -0
- package/es/elements/nces/SwaggerSchemes.mjs +9 -0
- package/es/elements/nces/SwaggerSecurity.mjs +10 -0
- package/es/elements/nces/SwaggerTags.mjs +9 -0
- package/es/index.mjs +31 -0
- package/es/media-types.mjs +18 -0
- package/es/namespace.mjs +63 -0
- package/es/predicates.mjs +217 -0
- package/es/refractor/index.mjs +41 -0
- package/es/refractor/plugins/replace-empty-element.mjs +357 -0
- package/es/refractor/predicates.mjs +8 -0
- package/es/refractor/registration.mjs +56 -0
- package/es/refractor/specification.mjs +482 -0
- package/es/refractor/toolbox.mjs +17 -0
- package/es/refractor/visitors/FallbackVisitor.mjs +18 -0
- package/es/refractor/visitors/SpecificationExtensionVisitor.mjs +13 -0
- package/es/refractor/visitors/SpecificationVisitor.mjs +82 -0
- package/es/refractor/visitors/Visitor.mjs +17 -0
- package/es/refractor/visitors/generics/AlternatingVisitor.mjs +22 -0
- package/es/refractor/visitors/generics/FixedFieldsVisitor.mjs +51 -0
- package/es/refractor/visitors/generics/MapVisitor.mjs +9 -0
- package/es/refractor/visitors/generics/MixedFieldsVisitor.mjs +37 -0
- package/es/refractor/visitors/generics/PatternedFieldsVisitor.mjs +53 -0
- package/es/refractor/visitors/open-api-2/ConsumesVisitor.mjs +16 -0
- package/es/refractor/visitors/open-api-2/ProducesVisitor.mjs +16 -0
- package/es/refractor/visitors/open-api-2/SchemesVisitor.mjs +16 -0
- package/es/refractor/visitors/open-api-2/SecurityVisitor.mjs +22 -0
- package/es/refractor/visitors/open-api-2/SwaggerVisitor.mjs +16 -0
- package/es/refractor/visitors/open-api-2/TagsVisitor.mjs +22 -0
- package/es/refractor/visitors/open-api-2/contact/index.mjs +15 -0
- package/es/refractor/visitors/open-api-2/definitions/index.mjs +28 -0
- package/es/refractor/visitors/open-api-2/example/index.mjs +15 -0
- package/es/refractor/visitors/open-api-2/external-documentation/index.mjs +15 -0
- package/es/refractor/visitors/open-api-2/header/index.mjs +15 -0
- package/es/refractor/visitors/open-api-2/headers/index.mjs +15 -0
- package/es/refractor/visitors/open-api-2/index.mjs +15 -0
- package/es/refractor/visitors/open-api-2/info/VersionVisitor.mjs +14 -0
- package/es/refractor/visitors/open-api-2/info/index.mjs +15 -0
- package/es/refractor/visitors/open-api-2/items/index.mjs +15 -0
- package/es/refractor/visitors/open-api-2/license/index.mjs +15 -0
- package/es/refractor/visitors/open-api-2/operation/ConsumesVisitor.mjs +16 -0
- package/es/refractor/visitors/open-api-2/operation/ParametersVisitor.mjs +27 -0
- package/es/refractor/visitors/open-api-2/operation/ProducesVisitor.mjs +16 -0
- package/es/refractor/visitors/open-api-2/operation/SchemesVisitor.mjs +16 -0
- package/es/refractor/visitors/open-api-2/operation/SecurityVisitor.mjs +22 -0
- package/es/refractor/visitors/open-api-2/operation/TagsVisitor.mjs +16 -0
- package/es/refractor/visitors/open-api-2/operation/index.mjs +14 -0
- package/es/refractor/visitors/open-api-2/parameter/index.mjs +15 -0
- package/es/refractor/visitors/open-api-2/parameters-definitions/index.mjs +14 -0
- package/es/refractor/visitors/open-api-2/path-item/$RefVisitor.mjs +13 -0
- package/es/refractor/visitors/open-api-2/path-item/ParametersVisitor.mjs +27 -0
- package/es/refractor/visitors/open-api-2/path-item/index.mjs +35 -0
- package/es/refractor/visitors/open-api-2/paths/index.mjs +30 -0
- package/es/refractor/visitors/open-api-2/reference/$RefVisitor.mjs +13 -0
- package/es/refractor/visitors/open-api-2/reference/index.mjs +28 -0
- package/es/refractor/visitors/open-api-2/response/index.mjs +15 -0
- package/es/refractor/visitors/open-api-2/responses/DefaultVisitor.mjs +32 -0
- package/es/refractor/visitors/open-api-2/responses/index.mjs +41 -0
- package/es/refractor/visitors/open-api-2/responses-definitions/index.mjs +14 -0
- package/es/refractor/visitors/open-api-2/schema/AllOfVisitor.mjs +18 -0
- package/es/refractor/visitors/open-api-2/schema/ItemsVisitor.mjs +26 -0
- package/es/refractor/visitors/open-api-2/schema/PropertiesVisitor.mjs +18 -0
- package/es/refractor/visitors/open-api-2/schema/SchemaOrJSONReferenceVisitor.mjs +18 -0
- package/es/refractor/visitors/open-api-2/schema/index.mjs +15 -0
- package/es/refractor/visitors/open-api-2/scopes/index.mjs +15 -0
- package/es/refractor/visitors/open-api-2/security-definitions/index.mjs +14 -0
- package/es/refractor/visitors/open-api-2/security-requirement/index.mjs +14 -0
- package/es/refractor/visitors/open-api-2/security-scheme/index.mjs +15 -0
- package/es/refractor/visitors/open-api-2/tag/index.mjs +15 -0
- package/es/refractor/visitors/open-api-2/xml/index.mjs +15 -0
- package/es/traversal/visitor.mjs +50 -0
- package/package.json +64 -0
- package/types/dist.d.ts +1143 -0
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
import { UnsupportedOperationError } from '@swagger-api/apidom-error';
|
|
2
|
+
import { JSONSchemaElement } from '@swagger-api/apidom-ns-json-schema-draft-4';
|
|
3
|
+
/* eslint-disable class-methods-use-this */
|
|
4
|
+
class Parameter extends JSONSchemaElement {
|
|
5
|
+
constructor(content, meta, attributes) {
|
|
6
|
+
super(content, meta, attributes);
|
|
7
|
+
this.element = 'parameter';
|
|
8
|
+
this.classes.push('json-schema-draft-4');
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Core vocabulary
|
|
13
|
+
*
|
|
14
|
+
* URI: https://tools.ietf.org/html/draft-wright-json-schema-00
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
get idProp() {
|
|
18
|
+
throw new UnsupportedOperationError('idProp getter in Parameter class is not not supported.');
|
|
19
|
+
}
|
|
20
|
+
set idProp(idProps) {
|
|
21
|
+
throw new UnsupportedOperationError('idProp setter in Parameter class is not not supported.');
|
|
22
|
+
}
|
|
23
|
+
get $schema() {
|
|
24
|
+
throw new UnsupportedOperationError('$schema getter in Parameter class is not not supported.');
|
|
25
|
+
}
|
|
26
|
+
set $schema($schema) {
|
|
27
|
+
throw new UnsupportedOperationError('$schema setter in Parameter class is not not supported.');
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Validation keywords for arrays
|
|
32
|
+
*/
|
|
33
|
+
|
|
34
|
+
get additionalItems() {
|
|
35
|
+
throw new UnsupportedOperationError('additionalItems getter in Parameter class is not not supported.');
|
|
36
|
+
}
|
|
37
|
+
set additionalItems(additionalItems) {
|
|
38
|
+
throw new UnsupportedOperationError('additionalItems setter in Parameter class is not not supported.');
|
|
39
|
+
}
|
|
40
|
+
get items() {
|
|
41
|
+
return this.get('items');
|
|
42
|
+
}
|
|
43
|
+
set items(items) {
|
|
44
|
+
this.set('items', items);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Validation keywords for objects
|
|
49
|
+
*/
|
|
50
|
+
|
|
51
|
+
get maxProperties() {
|
|
52
|
+
throw new UnsupportedOperationError('maxProperties getter in Parameter class is not not supported.');
|
|
53
|
+
}
|
|
54
|
+
set maxProperties(maxProperties) {
|
|
55
|
+
throw new UnsupportedOperationError('maxProperties setter in Parameter class is not not supported.');
|
|
56
|
+
}
|
|
57
|
+
get minProperties() {
|
|
58
|
+
throw new UnsupportedOperationError('minProperties getter in Parameter class is not not supported.');
|
|
59
|
+
}
|
|
60
|
+
set minProperties(minProperties) {
|
|
61
|
+
throw new UnsupportedOperationError('minProperties setter in Parameter class is not not supported.');
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
65
|
+
get required() {
|
|
66
|
+
return this.get('required');
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
70
|
+
set required(required) {
|
|
71
|
+
this.set('required', required);
|
|
72
|
+
}
|
|
73
|
+
get properties() {
|
|
74
|
+
throw new UnsupportedOperationError('properties getter in Parameter class is not not supported.');
|
|
75
|
+
}
|
|
76
|
+
set properties(properties) {
|
|
77
|
+
throw new UnsupportedOperationError('properties setter in Parameter class is not not supported.');
|
|
78
|
+
}
|
|
79
|
+
get additionalProperties() {
|
|
80
|
+
throw new UnsupportedOperationError('additionalProperties getter in Parameter class is not not supported.');
|
|
81
|
+
}
|
|
82
|
+
set additionalProperties(additionalProperties) {
|
|
83
|
+
throw new UnsupportedOperationError('additionalProperties setter in Parameter class is not not supported.');
|
|
84
|
+
}
|
|
85
|
+
get patternProperties() {
|
|
86
|
+
throw new UnsupportedOperationError('patternProperties getter in Parameter class is not not supported.');
|
|
87
|
+
}
|
|
88
|
+
set patternProperties(patternProperties) {
|
|
89
|
+
throw new UnsupportedOperationError('patternProperties setter in Parameter class is not not supported.');
|
|
90
|
+
}
|
|
91
|
+
get dependencies() {
|
|
92
|
+
throw new UnsupportedOperationError('dependencies getter in Parameter class is not not supported.');
|
|
93
|
+
}
|
|
94
|
+
set dependencies(dependencies) {
|
|
95
|
+
throw new UnsupportedOperationError('dependencies setter in Parameter class is not not supported.');
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* Validation keywords for any instance type
|
|
100
|
+
*/
|
|
101
|
+
|
|
102
|
+
get type() {
|
|
103
|
+
return this.get('type');
|
|
104
|
+
}
|
|
105
|
+
set type(type) {
|
|
106
|
+
this.set('type', type);
|
|
107
|
+
}
|
|
108
|
+
get allOf() {
|
|
109
|
+
throw new UnsupportedOperationError('allOf getter in Parameter class is not not supported.');
|
|
110
|
+
}
|
|
111
|
+
set allOf(allOf) {
|
|
112
|
+
throw new UnsupportedOperationError('allOf setter in Parameter class is not not supported.');
|
|
113
|
+
}
|
|
114
|
+
get anyOf() {
|
|
115
|
+
throw new UnsupportedOperationError('anyOf getter in Parameter class is not not supported.');
|
|
116
|
+
}
|
|
117
|
+
set anyOf(anyOf) {
|
|
118
|
+
throw new UnsupportedOperationError('anyOf setter in Parameter class is not not supported.');
|
|
119
|
+
}
|
|
120
|
+
get oneOf() {
|
|
121
|
+
throw new UnsupportedOperationError('oneOf getter in Parameter class is not not supported.');
|
|
122
|
+
}
|
|
123
|
+
set oneOf(oneOf) {
|
|
124
|
+
throw new UnsupportedOperationError('oneOf setter in Parameter class is not not supported.');
|
|
125
|
+
}
|
|
126
|
+
get not() {
|
|
127
|
+
throw new UnsupportedOperationError('not getter in Parameter class is not not supported.');
|
|
128
|
+
}
|
|
129
|
+
set not(not) {
|
|
130
|
+
throw new UnsupportedOperationError('not setter in Parameter class is not not supported.');
|
|
131
|
+
}
|
|
132
|
+
get definitions() {
|
|
133
|
+
throw new UnsupportedOperationError('definitions getter in Parameter class is not not supported.');
|
|
134
|
+
}
|
|
135
|
+
set definitions(definitions) {
|
|
136
|
+
throw new UnsupportedOperationError('definitions setter in Parameter class is not not supported.');
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* Metadata keywords
|
|
141
|
+
*
|
|
142
|
+
* URI: https://datatracker.ietf.org/doc/html/draft-wright-json-schema-validation-00#section-6
|
|
143
|
+
*/
|
|
144
|
+
|
|
145
|
+
get title() {
|
|
146
|
+
throw new UnsupportedOperationError('title getter in Parameter class is not not supported.');
|
|
147
|
+
}
|
|
148
|
+
set title(title) {
|
|
149
|
+
throw new UnsupportedOperationError('title setter in Parameter class is not not supported.');
|
|
150
|
+
}
|
|
151
|
+
get description() {
|
|
152
|
+
return this.get('description');
|
|
153
|
+
}
|
|
154
|
+
set description(description) {
|
|
155
|
+
this.set('description,', description);
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
/**
|
|
159
|
+
* Semantic validation with "format"
|
|
160
|
+
*
|
|
161
|
+
* URI: https://datatracker.ietf.org/doc/html/draft-wright-json-schema-validation-00#section-7
|
|
162
|
+
*/
|
|
163
|
+
|
|
164
|
+
get format() {
|
|
165
|
+
return this.get('format');
|
|
166
|
+
}
|
|
167
|
+
set format(format) {
|
|
168
|
+
this.set('format', format);
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
/**
|
|
172
|
+
* JSON Hyper-Schema
|
|
173
|
+
*
|
|
174
|
+
* URI: https://datatracker.ietf.org/doc/html/draft-wright-json-schema-hyperschema-00
|
|
175
|
+
*/
|
|
176
|
+
|
|
177
|
+
get base() {
|
|
178
|
+
throw new UnsupportedOperationError('base getter in Parameter class is not not supported.');
|
|
179
|
+
}
|
|
180
|
+
set base(base) {
|
|
181
|
+
throw new UnsupportedOperationError('base setter in Parameter class is not not supported.');
|
|
182
|
+
}
|
|
183
|
+
get links() {
|
|
184
|
+
throw new UnsupportedOperationError('links getter in Parameter class is not not supported.');
|
|
185
|
+
}
|
|
186
|
+
set links(links) {
|
|
187
|
+
throw new UnsupportedOperationError('links setter in Parameter class is not not supported.');
|
|
188
|
+
}
|
|
189
|
+
get media() {
|
|
190
|
+
throw new UnsupportedOperationError('media getter in Parameter class is not not supported.');
|
|
191
|
+
}
|
|
192
|
+
set media(media) {
|
|
193
|
+
throw new UnsupportedOperationError('media setter in Parameter class is not not supported.');
|
|
194
|
+
}
|
|
195
|
+
get readOnly() {
|
|
196
|
+
throw new UnsupportedOperationError('readOnly getter in Parameter class is not not supported.');
|
|
197
|
+
}
|
|
198
|
+
set readOnly(readOnly) {
|
|
199
|
+
throw new UnsupportedOperationError('readOnly setter in Parameter class is not not supported.');
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
/**
|
|
203
|
+
* OpenAPI vocabulary
|
|
204
|
+
*/
|
|
205
|
+
get name() {
|
|
206
|
+
return this.get('name');
|
|
207
|
+
}
|
|
208
|
+
set name(name) {
|
|
209
|
+
this.set('name', name);
|
|
210
|
+
}
|
|
211
|
+
get in() {
|
|
212
|
+
return this.get('in');
|
|
213
|
+
}
|
|
214
|
+
set in(val) {
|
|
215
|
+
this.set('in', val);
|
|
216
|
+
}
|
|
217
|
+
get schema() {
|
|
218
|
+
return this.get('schema');
|
|
219
|
+
}
|
|
220
|
+
set schema(schema) {
|
|
221
|
+
this.set('schema', schema);
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
/* eslint-enable class-methods-use-this */
|
|
225
|
+
|
|
226
|
+
export default Parameter;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ObjectElement } from '@swagger-api/apidom-core';
|
|
2
|
+
class ParametersDefinitions extends ObjectElement {
|
|
3
|
+
constructor(content, meta, attributes) {
|
|
4
|
+
super(content, meta, attributes);
|
|
5
|
+
this.element = 'parametersDefinitions';
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
export default ParametersDefinitions;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { ObjectElement } from '@swagger-api/apidom-core';
|
|
2
|
+
class PathItem extends ObjectElement {
|
|
3
|
+
constructor(content, meta, attributes) {
|
|
4
|
+
super(content, meta, attributes);
|
|
5
|
+
this.element = 'pathItem';
|
|
6
|
+
}
|
|
7
|
+
get $ref() {
|
|
8
|
+
return this.get('$ref');
|
|
9
|
+
}
|
|
10
|
+
set $ref($ref) {
|
|
11
|
+
this.set('$ref', $ref);
|
|
12
|
+
}
|
|
13
|
+
get GET() {
|
|
14
|
+
return this.get('get');
|
|
15
|
+
}
|
|
16
|
+
set GET(operation) {
|
|
17
|
+
this.set('GET', operation);
|
|
18
|
+
}
|
|
19
|
+
get PUT() {
|
|
20
|
+
return this.get('put');
|
|
21
|
+
}
|
|
22
|
+
set PUT(operation) {
|
|
23
|
+
this.set('PUT', operation);
|
|
24
|
+
}
|
|
25
|
+
get POST() {
|
|
26
|
+
return this.get('post');
|
|
27
|
+
}
|
|
28
|
+
set POST(operation) {
|
|
29
|
+
this.set('POST', operation);
|
|
30
|
+
}
|
|
31
|
+
get DELETE() {
|
|
32
|
+
return this.get('delete');
|
|
33
|
+
}
|
|
34
|
+
set DELETE(operation) {
|
|
35
|
+
this.set('DELETE', operation);
|
|
36
|
+
}
|
|
37
|
+
get OPTIONS() {
|
|
38
|
+
return this.get('options');
|
|
39
|
+
}
|
|
40
|
+
set OPTIONS(operation) {
|
|
41
|
+
this.set('OPTIONS', operation);
|
|
42
|
+
}
|
|
43
|
+
get HEAD() {
|
|
44
|
+
return this.get('head');
|
|
45
|
+
}
|
|
46
|
+
set HEAD(operation) {
|
|
47
|
+
this.set('HEAD', operation);
|
|
48
|
+
}
|
|
49
|
+
get PATCH() {
|
|
50
|
+
return this.get('patch');
|
|
51
|
+
}
|
|
52
|
+
set PATCH(operation) {
|
|
53
|
+
this.set('PATCH', operation);
|
|
54
|
+
}
|
|
55
|
+
get parameters() {
|
|
56
|
+
return this.get('parameters');
|
|
57
|
+
}
|
|
58
|
+
set parameters(parameters) {
|
|
59
|
+
this.set('parameters', parameters);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
export default PathItem;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ObjectElement } from '@swagger-api/apidom-core';
|
|
2
|
+
class Reference extends ObjectElement {
|
|
3
|
+
constructor(content, meta, attributes) {
|
|
4
|
+
super(content, meta, attributes);
|
|
5
|
+
this.element = 'reference';
|
|
6
|
+
this.classes.push('openapi-reference');
|
|
7
|
+
}
|
|
8
|
+
get $ref() {
|
|
9
|
+
return this.get('$ref');
|
|
10
|
+
}
|
|
11
|
+
set $ref($ref) {
|
|
12
|
+
this.set('$ref', $ref);
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
export default Reference;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { ObjectElement } from '@swagger-api/apidom-core';
|
|
2
|
+
class Response extends ObjectElement {
|
|
3
|
+
constructor(content, meta, attributes) {
|
|
4
|
+
super(content, meta, attributes);
|
|
5
|
+
this.element = 'response';
|
|
6
|
+
}
|
|
7
|
+
get description() {
|
|
8
|
+
return this.get('description');
|
|
9
|
+
}
|
|
10
|
+
set description(description) {
|
|
11
|
+
this.set('description', description);
|
|
12
|
+
}
|
|
13
|
+
get schema() {
|
|
14
|
+
return this.get('schema');
|
|
15
|
+
}
|
|
16
|
+
set schema(schema) {
|
|
17
|
+
this.set('schema', schema);
|
|
18
|
+
}
|
|
19
|
+
get headers() {
|
|
20
|
+
return this.get('headers');
|
|
21
|
+
}
|
|
22
|
+
set headers(headers) {
|
|
23
|
+
this.set('headers', headers);
|
|
24
|
+
}
|
|
25
|
+
get examples() {
|
|
26
|
+
return this.get('examples');
|
|
27
|
+
}
|
|
28
|
+
set examples(examples) {
|
|
29
|
+
this.set('examples', examples);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
export default Response;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ObjectElement } from '@swagger-api/apidom-core';
|
|
2
|
+
class Responses extends ObjectElement {
|
|
3
|
+
constructor(content, meta, attributes) {
|
|
4
|
+
super(content, meta, attributes);
|
|
5
|
+
this.element = 'responses';
|
|
6
|
+
}
|
|
7
|
+
get default() {
|
|
8
|
+
return this.get('default');
|
|
9
|
+
}
|
|
10
|
+
set default(defaultValue) {
|
|
11
|
+
this.set('default', defaultValue);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
export default Responses;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ObjectElement } from '@swagger-api/apidom-core';
|
|
2
|
+
class ResponsesDefinitions extends ObjectElement {
|
|
3
|
+
constructor(content, meta, attributes) {
|
|
4
|
+
super(content, meta, attributes);
|
|
5
|
+
this.element = 'responsesDefinitions';
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
export default ResponsesDefinitions;
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import { UnsupportedOperationError } from '@swagger-api/apidom-error';
|
|
2
|
+
import { JSONSchemaElement } from '@swagger-api/apidom-ns-json-schema-draft-4';
|
|
3
|
+
|
|
4
|
+
/* eslint-disable class-methods-use-this */
|
|
5
|
+
class Schema extends JSONSchemaElement {
|
|
6
|
+
constructor(content, meta, attributes) {
|
|
7
|
+
super(content, meta, attributes);
|
|
8
|
+
this.element = 'schema';
|
|
9
|
+
this.classes.push('json-schema-draft-4');
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Core vocabulary
|
|
14
|
+
*
|
|
15
|
+
* URI: https://tools.ietf.org/html/draft-wright-json-schema-00
|
|
16
|
+
*/
|
|
17
|
+
get idProp() {
|
|
18
|
+
throw new UnsupportedOperationError('idProp getter in Schema class is not not supported.');
|
|
19
|
+
}
|
|
20
|
+
set idProp(idProps) {
|
|
21
|
+
throw new UnsupportedOperationError('idProp setter in Schema class is not not supported.');
|
|
22
|
+
}
|
|
23
|
+
get $schema() {
|
|
24
|
+
throw new UnsupportedOperationError('$schema getter in Schema class is not not supported.');
|
|
25
|
+
}
|
|
26
|
+
set $schema($schema) {
|
|
27
|
+
throw new UnsupportedOperationError('$schema setter in Schema class is not not supported.');
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Validation keywords for arrays
|
|
32
|
+
*/
|
|
33
|
+
|
|
34
|
+
get additionalItems() {
|
|
35
|
+
throw new UnsupportedOperationError('additionalItems getter in Schema class is not not supported.');
|
|
36
|
+
}
|
|
37
|
+
set additionalItems(additionalItems) {
|
|
38
|
+
throw new UnsupportedOperationError('additionalItems setter in Schema class is not not supported.');
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Validation keywords for objects
|
|
43
|
+
*/
|
|
44
|
+
|
|
45
|
+
get patternProperties() {
|
|
46
|
+
throw new UnsupportedOperationError('patternProperties getter in Schema class is not not supported.');
|
|
47
|
+
}
|
|
48
|
+
set patternProperties(patternProperties) {
|
|
49
|
+
throw new UnsupportedOperationError('patternProperties setter in Schema class is not not supported.');
|
|
50
|
+
}
|
|
51
|
+
get dependencies() {
|
|
52
|
+
throw new UnsupportedOperationError('dependencies getter in Schema class is not not supported.');
|
|
53
|
+
}
|
|
54
|
+
set dependencies(dependencies) {
|
|
55
|
+
throw new UnsupportedOperationError('dependencies setter in Schema class is not not supported.');
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Validation keywords for any instance type
|
|
60
|
+
*/
|
|
61
|
+
get anyOf() {
|
|
62
|
+
throw new UnsupportedOperationError('anyOf getter in Schema class is not not supported.');
|
|
63
|
+
}
|
|
64
|
+
set anyOf(anyOf) {
|
|
65
|
+
throw new UnsupportedOperationError('anyOf setter in Schema class is not not supported.');
|
|
66
|
+
}
|
|
67
|
+
get oneOf() {
|
|
68
|
+
throw new UnsupportedOperationError('oneOf getter in Schema class is not not supported.');
|
|
69
|
+
}
|
|
70
|
+
set oneOf(oneOf) {
|
|
71
|
+
throw new UnsupportedOperationError('oneOf setter in Schema class is not not supported.');
|
|
72
|
+
}
|
|
73
|
+
get not() {
|
|
74
|
+
throw new UnsupportedOperationError('not getter in Schema class is not not supported.');
|
|
75
|
+
}
|
|
76
|
+
set not(not) {
|
|
77
|
+
throw new UnsupportedOperationError('not setter in Schema class is not not supported.');
|
|
78
|
+
}
|
|
79
|
+
get definitions() {
|
|
80
|
+
throw new UnsupportedOperationError('definitions getter in Schema class is not not supported.');
|
|
81
|
+
}
|
|
82
|
+
set definitions(definitions) {
|
|
83
|
+
throw new UnsupportedOperationError('definitions setter in Schema class is not not supported.');
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* JSON Hyper-Schema
|
|
88
|
+
*
|
|
89
|
+
* URI: https://datatracker.ietf.org/doc/html/draft-wright-json-schema-hyperschema-00
|
|
90
|
+
*/
|
|
91
|
+
|
|
92
|
+
get base() {
|
|
93
|
+
throw new UnsupportedOperationError('base getter in Schema class is not not supported.');
|
|
94
|
+
}
|
|
95
|
+
set base(base) {
|
|
96
|
+
throw new UnsupportedOperationError('base setter in Schema class is not not supported.');
|
|
97
|
+
}
|
|
98
|
+
get links() {
|
|
99
|
+
throw new UnsupportedOperationError('links getter in Schema class is not not supported.');
|
|
100
|
+
}
|
|
101
|
+
set links(links) {
|
|
102
|
+
throw new UnsupportedOperationError('links setter in Schema class is not not supported.');
|
|
103
|
+
}
|
|
104
|
+
get media() {
|
|
105
|
+
throw new UnsupportedOperationError('media getter in Schema class is not not supported.');
|
|
106
|
+
}
|
|
107
|
+
set media(media) {
|
|
108
|
+
throw new UnsupportedOperationError('media setter in Schema class is not not supported.');
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
/* eslint-enable class-methods-use-this */
|
|
112
|
+
|
|
113
|
+
export default Schema;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ObjectElement } from '@swagger-api/apidom-core';
|
|
2
|
+
class SecurityDefinitions extends ObjectElement {
|
|
3
|
+
constructor(content, meta, attributes) {
|
|
4
|
+
super(content, meta, attributes);
|
|
5
|
+
this.element = 'securityDefinitions';
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
export default SecurityDefinitions;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ObjectElement } from '@swagger-api/apidom-core';
|
|
2
|
+
class SecurityRequirement extends ObjectElement {
|
|
3
|
+
constructor(content, meta, attributes) {
|
|
4
|
+
super(content, meta, attributes);
|
|
5
|
+
this.element = 'securityRequirement';
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
export default SecurityRequirement;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { ObjectElement } from '@swagger-api/apidom-core';
|
|
2
|
+
class SecurityScheme extends ObjectElement {
|
|
3
|
+
constructor(content, meta, attributes) {
|
|
4
|
+
super(content, meta, attributes);
|
|
5
|
+
this.element = 'securityScheme';
|
|
6
|
+
}
|
|
7
|
+
get type() {
|
|
8
|
+
return this.get('type');
|
|
9
|
+
}
|
|
10
|
+
set type(type) {
|
|
11
|
+
this.set('type', type);
|
|
12
|
+
}
|
|
13
|
+
get description() {
|
|
14
|
+
return this.get('description');
|
|
15
|
+
}
|
|
16
|
+
set description(description) {
|
|
17
|
+
this.set('description', description);
|
|
18
|
+
}
|
|
19
|
+
get name() {
|
|
20
|
+
return this.get('name');
|
|
21
|
+
}
|
|
22
|
+
set name(name) {
|
|
23
|
+
this.set('name', name);
|
|
24
|
+
}
|
|
25
|
+
get in() {
|
|
26
|
+
return this.get('in');
|
|
27
|
+
}
|
|
28
|
+
set in(inVal) {
|
|
29
|
+
this.set('in', inVal);
|
|
30
|
+
}
|
|
31
|
+
get flow() {
|
|
32
|
+
return this.get('flow');
|
|
33
|
+
}
|
|
34
|
+
set flow(flow) {
|
|
35
|
+
this.set('flow', flow);
|
|
36
|
+
}
|
|
37
|
+
get authorizationUrl() {
|
|
38
|
+
return this.get('authorizationUrl');
|
|
39
|
+
}
|
|
40
|
+
set authorizationUrl(authorizationUrl) {
|
|
41
|
+
this.set('authorizationUrl', authorizationUrl);
|
|
42
|
+
}
|
|
43
|
+
get tokenUrl() {
|
|
44
|
+
return this.get('tokenUrl');
|
|
45
|
+
}
|
|
46
|
+
set tokenUrl(tokenUrl) {
|
|
47
|
+
this.set('tokenUrl', tokenUrl);
|
|
48
|
+
}
|
|
49
|
+
get scopes() {
|
|
50
|
+
return this.get('scopes');
|
|
51
|
+
}
|
|
52
|
+
set scopes(scopes) {
|
|
53
|
+
this.set('scopes', scopes);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
export default SecurityScheme;
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import { ObjectElement } from '@swagger-api/apidom-core';
|
|
2
|
+
class Swagger extends ObjectElement {
|
|
3
|
+
constructor(content, meta, attributes) {
|
|
4
|
+
super(content, meta, attributes);
|
|
5
|
+
this.element = 'swagger';
|
|
6
|
+
this.classes.push('api');
|
|
7
|
+
}
|
|
8
|
+
get swagger() {
|
|
9
|
+
return this.get('swagger');
|
|
10
|
+
}
|
|
11
|
+
set swagger(swagger) {
|
|
12
|
+
this.set('swagger', swagger);
|
|
13
|
+
}
|
|
14
|
+
get info() {
|
|
15
|
+
return this.get('info');
|
|
16
|
+
}
|
|
17
|
+
set info(info) {
|
|
18
|
+
this.set('info', info);
|
|
19
|
+
}
|
|
20
|
+
get host() {
|
|
21
|
+
return this.get('host');
|
|
22
|
+
}
|
|
23
|
+
set host(host) {
|
|
24
|
+
this.set('host', host);
|
|
25
|
+
}
|
|
26
|
+
get basePath() {
|
|
27
|
+
return this.get('basePath');
|
|
28
|
+
}
|
|
29
|
+
set basePath(basePath) {
|
|
30
|
+
this.set('basePath', basePath);
|
|
31
|
+
}
|
|
32
|
+
get schemes() {
|
|
33
|
+
return this.get('schemes');
|
|
34
|
+
}
|
|
35
|
+
set schemes(schemes) {
|
|
36
|
+
this.set('schemes', schemes);
|
|
37
|
+
}
|
|
38
|
+
get consumes() {
|
|
39
|
+
return this.get('consumes');
|
|
40
|
+
}
|
|
41
|
+
set consumes(consumes) {
|
|
42
|
+
this.set('consumes', consumes);
|
|
43
|
+
}
|
|
44
|
+
get produces() {
|
|
45
|
+
return this.get('produces');
|
|
46
|
+
}
|
|
47
|
+
set produces(produces) {
|
|
48
|
+
this.set('produces', produces);
|
|
49
|
+
}
|
|
50
|
+
get paths() {
|
|
51
|
+
return this.get('paths');
|
|
52
|
+
}
|
|
53
|
+
set paths(paths) {
|
|
54
|
+
this.set('paths', paths);
|
|
55
|
+
}
|
|
56
|
+
get definitions() {
|
|
57
|
+
return this.get('definitions');
|
|
58
|
+
}
|
|
59
|
+
set definitions(definitions) {
|
|
60
|
+
this.set('definitions', definitions);
|
|
61
|
+
}
|
|
62
|
+
get parameters() {
|
|
63
|
+
return this.get('parameters');
|
|
64
|
+
}
|
|
65
|
+
set parameters(parameters) {
|
|
66
|
+
this.set('parameters', parameters);
|
|
67
|
+
}
|
|
68
|
+
get responses() {
|
|
69
|
+
return this.get('responses');
|
|
70
|
+
}
|
|
71
|
+
set responses(responses) {
|
|
72
|
+
this.set('responses', responses);
|
|
73
|
+
}
|
|
74
|
+
get securityDefinitions() {
|
|
75
|
+
return this.get('securityDefinitions');
|
|
76
|
+
}
|
|
77
|
+
set securityDefinitions(securityDefinitions) {
|
|
78
|
+
this.set('securityDefinitions', securityDefinitions);
|
|
79
|
+
}
|
|
80
|
+
get security() {
|
|
81
|
+
return this.get('security');
|
|
82
|
+
}
|
|
83
|
+
set security(security) {
|
|
84
|
+
this.set('security', security);
|
|
85
|
+
}
|
|
86
|
+
get tags() {
|
|
87
|
+
return this.get('tags');
|
|
88
|
+
}
|
|
89
|
+
set tags(tags) {
|
|
90
|
+
this.set('tags', tags);
|
|
91
|
+
}
|
|
92
|
+
get externalDocs() {
|
|
93
|
+
return this.get('externalDocs');
|
|
94
|
+
}
|
|
95
|
+
set externalDocs(externalDocs) {
|
|
96
|
+
this.set('externalDocs', externalDocs);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
export default Swagger;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { StringElement } from '@swagger-api/apidom-core';
|
|
2
|
+
class SwaggerVersion extends StringElement {
|
|
3
|
+
constructor(content, meta, attributes) {
|
|
4
|
+
super(content, meta, attributes);
|
|
5
|
+
this.element = 'swaggerVersion';
|
|
6
|
+
this.classes.push('spec-version');
|
|
7
|
+
this.classes.push('version');
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
export default SwaggerVersion;
|