@speclynx/apidom-ns-openapi-2 1.12.1
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 +84 -0
- package/LICENSE +202 -0
- package/LICENSES/AFL-3.0.txt +182 -0
- package/LICENSES/Apache-2.0.txt +202 -0
- package/LICENSES/BSD-3-Clause.txt +26 -0
- package/LICENSES/MIT.txt +9 -0
- package/NOTICE +65 -0
- package/README.md +215 -0
- package/dist/apidom-ns-openapi-2.browser.js +23072 -0
- package/dist/apidom-ns-openapi-2.browser.min.js +1 -0
- package/package.json +65 -0
- package/src/elements/Contact.cjs +33 -0
- package/src/elements/Contact.mjs +30 -0
- package/src/elements/Definitions.cjs +15 -0
- package/src/elements/Definitions.mjs +12 -0
- package/src/elements/Example.cjs +15 -0
- package/src/elements/Example.mjs +12 -0
- package/src/elements/ExternalDocumentation.cjs +27 -0
- package/src/elements/ExternalDocumentation.mjs +24 -0
- package/src/elements/Header.cjs +185 -0
- package/src/elements/Header.mjs +182 -0
- package/src/elements/Headers.cjs +15 -0
- package/src/elements/Headers.mjs +12 -0
- package/src/elements/Info.cjs +52 -0
- package/src/elements/Info.mjs +48 -0
- package/src/elements/Items.cjs +190 -0
- package/src/elements/Items.mjs +187 -0
- package/src/elements/License.cjs +27 -0
- package/src/elements/License.mjs +24 -0
- package/src/elements/Operation.cjs +78 -0
- package/src/elements/Operation.mjs +74 -0
- package/src/elements/Parameter.cjs +230 -0
- package/src/elements/Parameter.mjs +226 -0
- package/src/elements/ParametersDefinitions.cjs +15 -0
- package/src/elements/ParametersDefinitions.mjs +12 -0
- package/src/elements/PathItem.cjs +69 -0
- package/src/elements/PathItem.mjs +65 -0
- package/src/elements/Paths.cjs +15 -0
- package/src/elements/Paths.mjs +12 -0
- package/src/elements/Reference.cjs +22 -0
- package/src/elements/Reference.mjs +19 -0
- package/src/elements/Response.cjs +39 -0
- package/src/elements/Response.mjs +35 -0
- package/src/elements/Responses.cjs +21 -0
- package/src/elements/Responses.mjs +17 -0
- package/src/elements/ResponsesDefinitions.cjs +15 -0
- package/src/elements/ResponsesDefinitions.mjs +12 -0
- package/src/elements/Schema.cjs +116 -0
- package/src/elements/Schema.mjs +113 -0
- package/src/elements/Scopes.cjs +15 -0
- package/src/elements/Scopes.mjs +12 -0
- package/src/elements/SecurityDefinitions.cjs +15 -0
- package/src/elements/SecurityDefinitions.mjs +12 -0
- package/src/elements/SecurityRequirement.cjs +15 -0
- package/src/elements/SecurityRequirement.mjs +12 -0
- package/src/elements/SecurityScheme.cjs +63 -0
- package/src/elements/SecurityScheme.mjs +60 -0
- package/src/elements/Swagger.cjs +106 -0
- package/src/elements/Swagger.mjs +102 -0
- package/src/elements/SwaggerVersion.cjs +17 -0
- package/src/elements/SwaggerVersion.mjs +14 -0
- package/src/elements/Tag.cjs +33 -0
- package/src/elements/Tag.mjs +29 -0
- package/src/elements/Xml.cjs +45 -0
- package/src/elements/Xml.mjs +42 -0
- package/src/elements/nces/OperationConsumes.cjs +16 -0
- package/src/elements/nces/OperationConsumes.mjs +13 -0
- package/src/elements/nces/OperationParameters.cjs +17 -0
- package/src/elements/nces/OperationParameters.mjs +14 -0
- package/src/elements/nces/OperationProduces.cjs +16 -0
- package/src/elements/nces/OperationProduces.mjs +13 -0
- package/src/elements/nces/OperationSchemes.cjs +16 -0
- package/src/elements/nces/OperationSchemes.mjs +13 -0
- package/src/elements/nces/OperationSecurity.cjs +17 -0
- package/src/elements/nces/OperationSecurity.mjs +14 -0
- package/src/elements/nces/OperationTags.cjs +17 -0
- package/src/elements/nces/OperationTags.mjs +14 -0
- package/src/elements/nces/PathItemParameters.cjs +17 -0
- package/src/elements/nces/PathItemParameters.mjs +14 -0
- package/src/elements/nces/SwaggerConsumes.cjs +16 -0
- package/src/elements/nces/SwaggerConsumes.mjs +13 -0
- package/src/elements/nces/SwaggerProduces.cjs +16 -0
- package/src/elements/nces/SwaggerProduces.mjs +13 -0
- package/src/elements/nces/SwaggerSchemes.cjs +16 -0
- package/src/elements/nces/SwaggerSchemes.mjs +13 -0
- package/src/elements/nces/SwaggerSecurity.cjs +17 -0
- package/src/elements/nces/SwaggerSecurity.mjs +14 -0
- package/src/elements/nces/SwaggerTags.cjs +16 -0
- package/src/elements/nces/SwaggerTags.mjs +13 -0
- package/src/index.cjs +135 -0
- package/src/index.mjs +31 -0
- package/src/media-types.cjs +34 -0
- package/src/media-types.mjs +30 -0
- package/src/namespace.cjs +71 -0
- package/src/namespace.mjs +66 -0
- package/src/predicates.cjs +329 -0
- package/src/predicates.mjs +324 -0
- package/src/refractor/index.cjs +52 -0
- package/src/refractor/index.mjs +46 -0
- package/src/refractor/plugins/replace-empty-element.cjs +358 -0
- package/src/refractor/plugins/replace-empty-element.mjs +350 -0
- package/src/refractor/predicates.cjs +25 -0
- package/src/refractor/predicates.mjs +20 -0
- package/src/refractor/registration.cjs +87 -0
- package/src/refractor/registration.mjs +56 -0
- package/src/refractor/specification.cjs +490 -0
- package/src/refractor/specification.mjs +484 -0
- package/src/refractor/toolbox.cjs +23 -0
- package/src/refractor/toolbox.mjs +17 -0
- package/src/refractor/visitors/FallbackVisitor.cjs +24 -0
- package/src/refractor/visitors/FallbackVisitor.mjs +18 -0
- package/src/refractor/visitors/SpecificationExtensionVisitor.cjs +18 -0
- package/src/refractor/visitors/SpecificationExtensionVisitor.mjs +13 -0
- package/src/refractor/visitors/SpecificationVisitor.cjs +74 -0
- package/src/refractor/visitors/SpecificationVisitor.mjs +68 -0
- package/src/refractor/visitors/Visitor.cjs +31 -0
- package/src/refractor/visitors/Visitor.mjs +28 -0
- package/src/refractor/visitors/generics/AlternatingVisitor.cjs +42 -0
- package/src/refractor/visitors/generics/AlternatingVisitor.mjs +35 -0
- package/src/refractor/visitors/generics/FixedFieldsVisitor.cjs +67 -0
- package/src/refractor/visitors/generics/FixedFieldsVisitor.mjs +60 -0
- package/src/refractor/visitors/generics/MapVisitor.cjs +21 -0
- package/src/refractor/visitors/generics/MapVisitor.mjs +15 -0
- package/src/refractor/visitors/generics/MixedFieldsVisitor.cjs +60 -0
- package/src/refractor/visitors/generics/MixedFieldsVisitor.mjs +54 -0
- package/src/refractor/visitors/generics/PatternedFieldsVisitor.cjs +67 -0
- package/src/refractor/visitors/generics/PatternedFieldsVisitor.mjs +61 -0
- package/src/refractor/visitors/open-api-2/BasePathVisitor.cjs +17 -0
- package/src/refractor/visitors/open-api-2/BasePathVisitor.mjs +12 -0
- package/src/refractor/visitors/open-api-2/ConsumesVisitor.cjs +22 -0
- package/src/refractor/visitors/open-api-2/ConsumesVisitor.mjs +17 -0
- package/src/refractor/visitors/open-api-2/HostVisitor.cjs +17 -0
- package/src/refractor/visitors/open-api-2/HostVisitor.mjs +12 -0
- package/src/refractor/visitors/open-api-2/ProducesVisitor.cjs +22 -0
- package/src/refractor/visitors/open-api-2/ProducesVisitor.mjs +17 -0
- package/src/refractor/visitors/open-api-2/SchemesVisitor.cjs +22 -0
- package/src/refractor/visitors/open-api-2/SchemesVisitor.mjs +17 -0
- package/src/refractor/visitors/open-api-2/SecurityVisitor.cjs +33 -0
- package/src/refractor/visitors/open-api-2/SecurityVisitor.mjs +27 -0
- package/src/refractor/visitors/open-api-2/SwaggerVisitor.cjs +26 -0
- package/src/refractor/visitors/open-api-2/SwaggerVisitor.mjs +20 -0
- package/src/refractor/visitors/open-api-2/TagsVisitor.cjs +33 -0
- package/src/refractor/visitors/open-api-2/TagsVisitor.mjs +27 -0
- package/src/refractor/visitors/open-api-2/contact/index.cjs +26 -0
- package/src/refractor/visitors/open-api-2/contact/index.mjs +20 -0
- package/src/refractor/visitors/open-api-2/definitions/index.cjs +38 -0
- package/src/refractor/visitors/open-api-2/definitions/index.mjs +32 -0
- package/src/refractor/visitors/open-api-2/example/index.cjs +26 -0
- package/src/refractor/visitors/open-api-2/example/index.mjs +20 -0
- package/src/refractor/visitors/open-api-2/external-documentation/index.cjs +26 -0
- package/src/refractor/visitors/open-api-2/external-documentation/index.mjs +20 -0
- package/src/refractor/visitors/open-api-2/header/index.cjs +26 -0
- package/src/refractor/visitors/open-api-2/header/index.mjs +20 -0
- package/src/refractor/visitors/open-api-2/headers/index.cjs +26 -0
- package/src/refractor/visitors/open-api-2/headers/index.mjs +20 -0
- package/src/refractor/visitors/open-api-2/index.cjs +26 -0
- package/src/refractor/visitors/open-api-2/index.mjs +20 -0
- package/src/refractor/visitors/open-api-2/info/VersionVisitor.cjs +18 -0
- package/src/refractor/visitors/open-api-2/info/VersionVisitor.mjs +13 -0
- package/src/refractor/visitors/open-api-2/info/index.cjs +26 -0
- package/src/refractor/visitors/open-api-2/info/index.mjs +20 -0
- package/src/refractor/visitors/open-api-2/items/index.cjs +28 -0
- package/src/refractor/visitors/open-api-2/items/index.mjs +22 -0
- package/src/refractor/visitors/open-api-2/license/index.cjs +26 -0
- package/src/refractor/visitors/open-api-2/license/index.mjs +20 -0
- package/src/refractor/visitors/open-api-2/operation/ConsumesVisitor.cjs +22 -0
- package/src/refractor/visitors/open-api-2/operation/ConsumesVisitor.mjs +17 -0
- package/src/refractor/visitors/open-api-2/operation/ParametersVisitor.cjs +38 -0
- package/src/refractor/visitors/open-api-2/operation/ParametersVisitor.mjs +32 -0
- package/src/refractor/visitors/open-api-2/operation/ProducesVisitor.cjs +22 -0
- package/src/refractor/visitors/open-api-2/operation/ProducesVisitor.mjs +17 -0
- package/src/refractor/visitors/open-api-2/operation/SchemesVisitor.cjs +22 -0
- package/src/refractor/visitors/open-api-2/operation/SchemesVisitor.mjs +17 -0
- package/src/refractor/visitors/open-api-2/operation/SecurityVisitor.cjs +33 -0
- package/src/refractor/visitors/open-api-2/operation/SecurityVisitor.mjs +27 -0
- package/src/refractor/visitors/open-api-2/operation/TagsVisitor.cjs +22 -0
- package/src/refractor/visitors/open-api-2/operation/TagsVisitor.mjs +17 -0
- package/src/refractor/visitors/open-api-2/operation/index.cjs +25 -0
- package/src/refractor/visitors/open-api-2/operation/index.mjs +19 -0
- package/src/refractor/visitors/open-api-2/parameter/index.cjs +26 -0
- package/src/refractor/visitors/open-api-2/parameter/index.mjs +20 -0
- package/src/refractor/visitors/open-api-2/parameters-definitions/index.cjs +25 -0
- package/src/refractor/visitors/open-api-2/parameters-definitions/index.mjs +19 -0
- package/src/refractor/visitors/open-api-2/path-item/$RefVisitor.cjs +17 -0
- package/src/refractor/visitors/open-api-2/path-item/$RefVisitor.mjs +12 -0
- package/src/refractor/visitors/open-api-2/path-item/ParametersVisitor.cjs +38 -0
- package/src/refractor/visitors/open-api-2/path-item/ParametersVisitor.mjs +32 -0
- package/src/refractor/visitors/open-api-2/path-item/index.cjs +45 -0
- package/src/refractor/visitors/open-api-2/path-item/index.mjs +39 -0
- package/src/refractor/visitors/open-api-2/paths/index.cjs +43 -0
- package/src/refractor/visitors/open-api-2/paths/index.mjs +37 -0
- package/src/refractor/visitors/open-api-2/reference/$RefVisitor.cjs +17 -0
- package/src/refractor/visitors/open-api-2/reference/$RefVisitor.mjs +12 -0
- package/src/refractor/visitors/open-api-2/reference/index.cjs +36 -0
- package/src/refractor/visitors/open-api-2/reference/index.mjs +30 -0
- package/src/refractor/visitors/open-api-2/response/index.cjs +26 -0
- package/src/refractor/visitors/open-api-2/response/index.mjs +20 -0
- package/src/refractor/visitors/open-api-2/responses/DefaultVisitor.cjs +42 -0
- package/src/refractor/visitors/open-api-2/responses/DefaultVisitor.mjs +36 -0
- package/src/refractor/visitors/open-api-2/responses/index.cjs +52 -0
- package/src/refractor/visitors/open-api-2/responses/index.mjs +46 -0
- package/src/refractor/visitors/open-api-2/responses-definitions/index.cjs +25 -0
- package/src/refractor/visitors/open-api-2/responses-definitions/index.mjs +19 -0
- package/src/refractor/visitors/open-api-2/schema/AllOfVisitor.cjs +25 -0
- package/src/refractor/visitors/open-api-2/schema/AllOfVisitor.mjs +21 -0
- package/src/refractor/visitors/open-api-2/schema/ItemsVisitor.cjs +32 -0
- package/src/refractor/visitors/open-api-2/schema/ItemsVisitor.mjs +28 -0
- package/src/refractor/visitors/open-api-2/schema/PropertiesVisitor.cjs +25 -0
- package/src/refractor/visitors/open-api-2/schema/PropertiesVisitor.mjs +21 -0
- package/src/refractor/visitors/open-api-2/schema/SchemaOrJSONReferenceVisitor.cjs +24 -0
- package/src/refractor/visitors/open-api-2/schema/SchemaOrJSONReferenceVisitor.mjs +20 -0
- package/src/refractor/visitors/open-api-2/schema/index.cjs +26 -0
- package/src/refractor/visitors/open-api-2/schema/index.mjs +20 -0
- package/src/refractor/visitors/open-api-2/scopes/index.cjs +26 -0
- package/src/refractor/visitors/open-api-2/scopes/index.mjs +20 -0
- package/src/refractor/visitors/open-api-2/security-definitions/index.cjs +26 -0
- package/src/refractor/visitors/open-api-2/security-definitions/index.mjs +20 -0
- package/src/refractor/visitors/open-api-2/security-requirement/index.cjs +25 -0
- package/src/refractor/visitors/open-api-2/security-requirement/index.mjs +19 -0
- package/src/refractor/visitors/open-api-2/security-scheme/index.cjs +26 -0
- package/src/refractor/visitors/open-api-2/security-scheme/index.mjs +20 -0
- package/src/refractor/visitors/open-api-2/tag/index.cjs +26 -0
- package/src/refractor/visitors/open-api-2/tag/index.mjs +20 -0
- package/src/refractor/visitors/open-api-2/xml/index.cjs +26 -0
- package/src/refractor/visitors/open-api-2/xml/index.mjs +20 -0
- package/src/traversal/visitor.cjs +56 -0
- package/src/traversal/visitor.mjs +53 -0
- package/types/apidom-ns-openapi-2.d.ts +2485 -0
|
@@ -0,0 +1,490 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault").default;
|
|
4
|
+
exports.__esModule = true;
|
|
5
|
+
exports.default = void 0;
|
|
6
|
+
var _apidomNsJsonSchemaDraft = require("@speclynx/apidom-ns-json-schema-draft-4");
|
|
7
|
+
var _FallbackVisitor = _interopRequireDefault(require("./visitors/FallbackVisitor.cjs"));
|
|
8
|
+
var _index = _interopRequireDefault(require("./visitors/open-api-2/index.cjs"));
|
|
9
|
+
var _SwaggerVisitor = _interopRequireDefault(require("./visitors/open-api-2/SwaggerVisitor.cjs"));
|
|
10
|
+
var _HostVisitor = _interopRequireDefault(require("./visitors/open-api-2/HostVisitor.cjs"));
|
|
11
|
+
var _BasePathVisitor = _interopRequireDefault(require("./visitors/open-api-2/BasePathVisitor.cjs"));
|
|
12
|
+
var _SchemesVisitor = _interopRequireDefault(require("./visitors/open-api-2/SchemesVisitor.cjs"));
|
|
13
|
+
var _ConsumesVisitor = _interopRequireDefault(require("./visitors/open-api-2/ConsumesVisitor.cjs"));
|
|
14
|
+
var _ProducesVisitor = _interopRequireDefault(require("./visitors/open-api-2/ProducesVisitor.cjs"));
|
|
15
|
+
var _SecurityVisitor = _interopRequireDefault(require("./visitors/open-api-2/SecurityVisitor.cjs"));
|
|
16
|
+
var _TagsVisitor = _interopRequireDefault(require("./visitors/open-api-2/TagsVisitor.cjs"));
|
|
17
|
+
var _index2 = _interopRequireDefault(require("./visitors/open-api-2/info/index.cjs"));
|
|
18
|
+
var _VersionVisitor = _interopRequireDefault(require("./visitors/open-api-2/info/VersionVisitor.cjs"));
|
|
19
|
+
var _index3 = _interopRequireDefault(require("./visitors/open-api-2/contact/index.cjs"));
|
|
20
|
+
var _index4 = _interopRequireDefault(require("./visitors/open-api-2/license/index.cjs"));
|
|
21
|
+
var _index5 = _interopRequireDefault(require("./visitors/open-api-2/paths/index.cjs"));
|
|
22
|
+
var _index6 = _interopRequireDefault(require("./visitors/open-api-2/path-item/index.cjs"));
|
|
23
|
+
var _$RefVisitor = _interopRequireDefault(require("./visitors/open-api-2/path-item/$RefVisitor.cjs"));
|
|
24
|
+
var _ParametersVisitor = _interopRequireDefault(require("./visitors/open-api-2/path-item/ParametersVisitor.cjs"));
|
|
25
|
+
var _index7 = _interopRequireDefault(require("./visitors/open-api-2/operation/index.cjs"));
|
|
26
|
+
var _TagsVisitor2 = _interopRequireDefault(require("./visitors/open-api-2/operation/TagsVisitor.cjs"));
|
|
27
|
+
var _ConsumesVisitor2 = _interopRequireDefault(require("./visitors/open-api-2/operation/ConsumesVisitor.cjs"));
|
|
28
|
+
var _ProducesVisitor2 = _interopRequireDefault(require("./visitors/open-api-2/operation/ProducesVisitor.cjs"));
|
|
29
|
+
var _ParametersVisitor2 = _interopRequireDefault(require("./visitors/open-api-2/operation/ParametersVisitor.cjs"));
|
|
30
|
+
var _SchemesVisitor2 = _interopRequireDefault(require("./visitors/open-api-2/operation/SchemesVisitor.cjs"));
|
|
31
|
+
var _SecurityVisitor2 = _interopRequireDefault(require("./visitors/open-api-2/operation/SecurityVisitor.cjs"));
|
|
32
|
+
var _index8 = _interopRequireDefault(require("./visitors/open-api-2/external-documentation/index.cjs"));
|
|
33
|
+
var _index9 = _interopRequireDefault(require("./visitors/open-api-2/parameter/index.cjs"));
|
|
34
|
+
var _index0 = _interopRequireDefault(require("./visitors/open-api-2/items/index.cjs"));
|
|
35
|
+
var _index1 = _interopRequireDefault(require("./visitors/open-api-2/responses/index.cjs"));
|
|
36
|
+
var _DefaultVisitor = _interopRequireDefault(require("./visitors/open-api-2/responses/DefaultVisitor.cjs"));
|
|
37
|
+
var _index10 = _interopRequireDefault(require("./visitors/open-api-2/response/index.cjs"));
|
|
38
|
+
var _index11 = _interopRequireDefault(require("./visitors/open-api-2/headers/index.cjs"));
|
|
39
|
+
var _index12 = _interopRequireDefault(require("./visitors/open-api-2/example/index.cjs"));
|
|
40
|
+
var _index13 = _interopRequireDefault(require("./visitors/open-api-2/header/index.cjs"));
|
|
41
|
+
var _index14 = _interopRequireDefault(require("./visitors/open-api-2/tag/index.cjs"));
|
|
42
|
+
var _index15 = _interopRequireDefault(require("./visitors/open-api-2/reference/index.cjs"));
|
|
43
|
+
var _$RefVisitor2 = _interopRequireDefault(require("./visitors/open-api-2/reference/$RefVisitor.cjs"));
|
|
44
|
+
var _index16 = _interopRequireDefault(require("./visitors/open-api-2/schema/index.cjs"));
|
|
45
|
+
var _AllOfVisitor = _interopRequireDefault(require("./visitors/open-api-2/schema/AllOfVisitor.cjs"));
|
|
46
|
+
var _ItemsVisitor = _interopRequireDefault(require("./visitors/open-api-2/schema/ItemsVisitor.cjs"));
|
|
47
|
+
var _PropertiesVisitor = _interopRequireDefault(require("./visitors/open-api-2/schema/PropertiesVisitor.cjs"));
|
|
48
|
+
var _SchemaOrJSONReferenceVisitor = _interopRequireDefault(require("./visitors/open-api-2/schema/SchemaOrJSONReferenceVisitor.cjs"));
|
|
49
|
+
var _index17 = _interopRequireDefault(require("./visitors/open-api-2/xml/index.cjs"));
|
|
50
|
+
var _index18 = _interopRequireDefault(require("./visitors/open-api-2/definitions/index.cjs"));
|
|
51
|
+
var _index19 = _interopRequireDefault(require("./visitors/open-api-2/responses-definitions/index.cjs"));
|
|
52
|
+
var _index20 = _interopRequireDefault(require("./visitors/open-api-2/parameters-definitions/index.cjs"));
|
|
53
|
+
var _index21 = _interopRequireDefault(require("./visitors/open-api-2/security-definitions/index.cjs"));
|
|
54
|
+
var _index22 = _interopRequireDefault(require("./visitors/open-api-2/security-scheme/index.cjs"));
|
|
55
|
+
var _index23 = _interopRequireDefault(require("./visitors/open-api-2/scopes/index.cjs"));
|
|
56
|
+
var _index24 = _interopRequireDefault(require("./visitors/open-api-2/security-requirement/index.cjs"));
|
|
57
|
+
var _SpecificationExtensionVisitor = _interopRequireDefault(require("./visitors/SpecificationExtensionVisitor.cjs"));
|
|
58
|
+
/**
|
|
59
|
+
* Specification object allows us to have complete control over visitors
|
|
60
|
+
* when traversing the ApiDOM.
|
|
61
|
+
* Specification also allows us to create amended refractors from
|
|
62
|
+
* existing ones by manipulating it.
|
|
63
|
+
*
|
|
64
|
+
* Note: Specification object allows to use absolute internal JSON pointers.
|
|
65
|
+
*/
|
|
66
|
+
|
|
67
|
+
const {
|
|
68
|
+
fixedFields: jsonSchemaFixedFields
|
|
69
|
+
} = _apidomNsJsonSchemaDraft.specificationObj.visitors.document.objects.JSONSchema;
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* @public
|
|
73
|
+
*/
|
|
74
|
+
const specification = {
|
|
75
|
+
visitors: {
|
|
76
|
+
value: _FallbackVisitor.default,
|
|
77
|
+
document: {
|
|
78
|
+
objects: {
|
|
79
|
+
// JSON Schema Draft 4/5 specific visitors
|
|
80
|
+
JSONReference: _apidomNsJsonSchemaDraft.specificationObj.visitors.document.objects.JSONReference,
|
|
81
|
+
JSONSchema: {
|
|
82
|
+
$ref: '#/visitors/document/objects/Schema'
|
|
83
|
+
},
|
|
84
|
+
// OpenAPI 2 specific visitors
|
|
85
|
+
Swagger: {
|
|
86
|
+
$visitor: _index.default,
|
|
87
|
+
fixedFields: {
|
|
88
|
+
swagger: _SwaggerVisitor.default,
|
|
89
|
+
info: {
|
|
90
|
+
$ref: '#/visitors/document/objects/Info'
|
|
91
|
+
},
|
|
92
|
+
host: _HostVisitor.default,
|
|
93
|
+
basePath: _BasePathVisitor.default,
|
|
94
|
+
schemes: _SchemesVisitor.default,
|
|
95
|
+
consumes: _ConsumesVisitor.default,
|
|
96
|
+
produces: _ProducesVisitor.default,
|
|
97
|
+
paths: {
|
|
98
|
+
$ref: '#/visitors/document/objects/Paths'
|
|
99
|
+
},
|
|
100
|
+
definitions: {
|
|
101
|
+
$ref: '#/visitors/document/objects/Definitions'
|
|
102
|
+
},
|
|
103
|
+
parameters: {
|
|
104
|
+
$ref: '#/visitors/document/objects/ParametersDefinitions'
|
|
105
|
+
},
|
|
106
|
+
responses: {
|
|
107
|
+
$ref: '#/visitors/document/objects/ResponsesDefinitions'
|
|
108
|
+
},
|
|
109
|
+
securityDefinitions: {
|
|
110
|
+
$ref: '#/visitors/document/objects/SecurityDefinitions'
|
|
111
|
+
},
|
|
112
|
+
security: _SecurityVisitor.default,
|
|
113
|
+
tags: _TagsVisitor.default,
|
|
114
|
+
externalDocs: {
|
|
115
|
+
$ref: '#/visitors/document/objects/ExternalDocumentation'
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
},
|
|
119
|
+
Info: {
|
|
120
|
+
$visitor: _index2.default,
|
|
121
|
+
fixedFields: {
|
|
122
|
+
title: {
|
|
123
|
+
$ref: '#/visitors/value'
|
|
124
|
+
},
|
|
125
|
+
description: {
|
|
126
|
+
$ref: '#/visitors/value'
|
|
127
|
+
},
|
|
128
|
+
termsOfService: {
|
|
129
|
+
$ref: '#/visitors/value'
|
|
130
|
+
},
|
|
131
|
+
contact: {
|
|
132
|
+
$ref: '#/visitors/document/objects/Contact'
|
|
133
|
+
},
|
|
134
|
+
license: {
|
|
135
|
+
$ref: '#/visitors/document/objects/License'
|
|
136
|
+
},
|
|
137
|
+
version: _VersionVisitor.default
|
|
138
|
+
}
|
|
139
|
+
},
|
|
140
|
+
Contact: {
|
|
141
|
+
$visitor: _index3.default,
|
|
142
|
+
fixedFields: {
|
|
143
|
+
name: {
|
|
144
|
+
$ref: '#/visitors/value'
|
|
145
|
+
},
|
|
146
|
+
url: {
|
|
147
|
+
$ref: '#/visitors/value'
|
|
148
|
+
},
|
|
149
|
+
email: {
|
|
150
|
+
$ref: '#/visitors/value'
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
},
|
|
154
|
+
License: {
|
|
155
|
+
$visitor: _index4.default,
|
|
156
|
+
fixedFields: {
|
|
157
|
+
name: {
|
|
158
|
+
$ref: '#/visitors/value'
|
|
159
|
+
},
|
|
160
|
+
url: {
|
|
161
|
+
$ref: '#/visitors/value'
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
},
|
|
165
|
+
Paths: {
|
|
166
|
+
$visitor: _index5.default
|
|
167
|
+
},
|
|
168
|
+
PathItem: {
|
|
169
|
+
$visitor: _index6.default,
|
|
170
|
+
fixedFields: {
|
|
171
|
+
$ref: _$RefVisitor.default,
|
|
172
|
+
get: {
|
|
173
|
+
$ref: '#/visitors/document/objects/Operation'
|
|
174
|
+
},
|
|
175
|
+
put: {
|
|
176
|
+
$ref: '#/visitors/document/objects/Operation'
|
|
177
|
+
},
|
|
178
|
+
post: {
|
|
179
|
+
$ref: '#/visitors/document/objects/Operation'
|
|
180
|
+
},
|
|
181
|
+
delete: {
|
|
182
|
+
$ref: '#/visitors/document/objects/Operation'
|
|
183
|
+
},
|
|
184
|
+
options: {
|
|
185
|
+
$ref: '#/visitors/document/objects/Operation'
|
|
186
|
+
},
|
|
187
|
+
head: {
|
|
188
|
+
$ref: '#/visitors/document/objects/Operation'
|
|
189
|
+
},
|
|
190
|
+
patch: {
|
|
191
|
+
$ref: '#/visitors/document/objects/Operation'
|
|
192
|
+
},
|
|
193
|
+
parameters: _ParametersVisitor.default
|
|
194
|
+
}
|
|
195
|
+
},
|
|
196
|
+
Operation: {
|
|
197
|
+
$visitor: _index7.default,
|
|
198
|
+
fixedFields: {
|
|
199
|
+
tags: _TagsVisitor2.default,
|
|
200
|
+
summary: {
|
|
201
|
+
$ref: '#/visitors/value'
|
|
202
|
+
},
|
|
203
|
+
description: {
|
|
204
|
+
$ref: '#/visitors/value'
|
|
205
|
+
},
|
|
206
|
+
externalDocs: {
|
|
207
|
+
$ref: '#/visitors/document/objects/ExternalDocumentation'
|
|
208
|
+
},
|
|
209
|
+
operationId: {
|
|
210
|
+
$ref: '#/visitors/value'
|
|
211
|
+
},
|
|
212
|
+
consumes: _ConsumesVisitor2.default,
|
|
213
|
+
produces: _ProducesVisitor2.default,
|
|
214
|
+
parameters: _ParametersVisitor2.default,
|
|
215
|
+
responses: {
|
|
216
|
+
$ref: '#/visitors/document/objects/Responses'
|
|
217
|
+
},
|
|
218
|
+
schemes: _SchemesVisitor2.default,
|
|
219
|
+
deprecated: {
|
|
220
|
+
$ref: '#/visitors/value'
|
|
221
|
+
},
|
|
222
|
+
security: _SecurityVisitor2.default
|
|
223
|
+
}
|
|
224
|
+
},
|
|
225
|
+
ExternalDocumentation: {
|
|
226
|
+
$visitor: _index8.default,
|
|
227
|
+
fixedFields: {
|
|
228
|
+
description: {
|
|
229
|
+
$ref: '#/visitors/value'
|
|
230
|
+
},
|
|
231
|
+
url: {
|
|
232
|
+
$ref: '#/visitors/value'
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
},
|
|
236
|
+
Parameter: {
|
|
237
|
+
$visitor: _index9.default,
|
|
238
|
+
fixedFields: {
|
|
239
|
+
name: {
|
|
240
|
+
$ref: '#/visitors/value'
|
|
241
|
+
},
|
|
242
|
+
in: {
|
|
243
|
+
$ref: '#/visitors/value'
|
|
244
|
+
},
|
|
245
|
+
description: jsonSchemaFixedFields.description,
|
|
246
|
+
required: jsonSchemaFixedFields.required,
|
|
247
|
+
schema: _SchemaOrJSONReferenceVisitor.default,
|
|
248
|
+
type: jsonSchemaFixedFields.type,
|
|
249
|
+
format: jsonSchemaFixedFields.format,
|
|
250
|
+
items: {
|
|
251
|
+
$ref: '#/visitors/document/objects/Items'
|
|
252
|
+
},
|
|
253
|
+
collectionFormat: {
|
|
254
|
+
$ref: '#/visitors/value'
|
|
255
|
+
},
|
|
256
|
+
default: jsonSchemaFixedFields.default,
|
|
257
|
+
maximum: jsonSchemaFixedFields.maximum,
|
|
258
|
+
exclusiveMaximum: jsonSchemaFixedFields.exclusiveMaximum,
|
|
259
|
+
minimum: jsonSchemaFixedFields.minimum,
|
|
260
|
+
exclusiveMinimum: jsonSchemaFixedFields.exclusiveMinimum,
|
|
261
|
+
maxLength: jsonSchemaFixedFields.maxLength,
|
|
262
|
+
minLength: jsonSchemaFixedFields.minLength,
|
|
263
|
+
pattern: jsonSchemaFixedFields.pattern,
|
|
264
|
+
maxItems: jsonSchemaFixedFields.maxItems,
|
|
265
|
+
minItems: jsonSchemaFixedFields.minItems,
|
|
266
|
+
uniqueItems: jsonSchemaFixedFields.uniqueItems,
|
|
267
|
+
enum: jsonSchemaFixedFields.enum,
|
|
268
|
+
multipleOf: jsonSchemaFixedFields.multipleOf
|
|
269
|
+
}
|
|
270
|
+
},
|
|
271
|
+
Items: {
|
|
272
|
+
$visitor: _index0.default,
|
|
273
|
+
fixedFields: {
|
|
274
|
+
type: jsonSchemaFixedFields.type,
|
|
275
|
+
format: jsonSchemaFixedFields.format,
|
|
276
|
+
items: {
|
|
277
|
+
$ref: '#/visitors/document/objects/Items'
|
|
278
|
+
},
|
|
279
|
+
collectionFormat: {
|
|
280
|
+
$ref: '#/visitors/value'
|
|
281
|
+
},
|
|
282
|
+
default: jsonSchemaFixedFields.default,
|
|
283
|
+
maximum: jsonSchemaFixedFields.maximum,
|
|
284
|
+
exclusiveMaximum: jsonSchemaFixedFields.exclusiveMaximum,
|
|
285
|
+
minimum: jsonSchemaFixedFields.minimum,
|
|
286
|
+
exclusiveMinimum: jsonSchemaFixedFields.exclusiveMinimum,
|
|
287
|
+
maxLength: jsonSchemaFixedFields.maxLength,
|
|
288
|
+
minLength: jsonSchemaFixedFields.minLength,
|
|
289
|
+
pattern: jsonSchemaFixedFields.pattern,
|
|
290
|
+
maxItems: jsonSchemaFixedFields.maxItems,
|
|
291
|
+
minItems: jsonSchemaFixedFields.minItems,
|
|
292
|
+
uniqueItems: jsonSchemaFixedFields.uniqueItems,
|
|
293
|
+
enum: jsonSchemaFixedFields.enum,
|
|
294
|
+
multipleOf: jsonSchemaFixedFields.multipleOf
|
|
295
|
+
}
|
|
296
|
+
},
|
|
297
|
+
Responses: {
|
|
298
|
+
$visitor: _index1.default,
|
|
299
|
+
fixedFields: {
|
|
300
|
+
default: _DefaultVisitor.default
|
|
301
|
+
}
|
|
302
|
+
},
|
|
303
|
+
Response: {
|
|
304
|
+
$visitor: _index10.default,
|
|
305
|
+
fixedFields: {
|
|
306
|
+
description: {
|
|
307
|
+
$ref: '#/visitors/value'
|
|
308
|
+
},
|
|
309
|
+
schema: _SchemaOrJSONReferenceVisitor.default,
|
|
310
|
+
headers: {
|
|
311
|
+
$ref: '#/visitors/document/objects/Headers'
|
|
312
|
+
},
|
|
313
|
+
examples: {
|
|
314
|
+
$ref: '#/visitors/document/objects/Example'
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
},
|
|
318
|
+
Headers: {
|
|
319
|
+
$visitor: _index11.default
|
|
320
|
+
},
|
|
321
|
+
Example: {
|
|
322
|
+
$visitor: _index12.default
|
|
323
|
+
},
|
|
324
|
+
Header: {
|
|
325
|
+
$visitor: _index13.default,
|
|
326
|
+
fixedFields: {
|
|
327
|
+
description: jsonSchemaFixedFields.description,
|
|
328
|
+
type: jsonSchemaFixedFields.type,
|
|
329
|
+
format: jsonSchemaFixedFields.format,
|
|
330
|
+
items: {
|
|
331
|
+
$ref: '#/visitors/document/objects/Items'
|
|
332
|
+
},
|
|
333
|
+
collectionFormat: {
|
|
334
|
+
$ref: '#/visitors/value'
|
|
335
|
+
},
|
|
336
|
+
default: jsonSchemaFixedFields.default,
|
|
337
|
+
maximum: jsonSchemaFixedFields.maximum,
|
|
338
|
+
exclusiveMaximum: jsonSchemaFixedFields.exclusiveMaximum,
|
|
339
|
+
minimum: jsonSchemaFixedFields.minimum,
|
|
340
|
+
exclusiveMinimum: jsonSchemaFixedFields.exclusiveMinimum,
|
|
341
|
+
maxLength: jsonSchemaFixedFields.maxLength,
|
|
342
|
+
minLength: jsonSchemaFixedFields.minLength,
|
|
343
|
+
pattern: jsonSchemaFixedFields.pattern,
|
|
344
|
+
maxItems: jsonSchemaFixedFields.maxItems,
|
|
345
|
+
minItems: jsonSchemaFixedFields.minItems,
|
|
346
|
+
uniqueItems: jsonSchemaFixedFields.uniqueItems,
|
|
347
|
+
enum: jsonSchemaFixedFields.enum,
|
|
348
|
+
multipleOf: jsonSchemaFixedFields.multipleOf
|
|
349
|
+
}
|
|
350
|
+
},
|
|
351
|
+
Tag: {
|
|
352
|
+
$visitor: _index14.default,
|
|
353
|
+
fixedFields: {
|
|
354
|
+
name: {
|
|
355
|
+
$ref: '#/visitors/value'
|
|
356
|
+
},
|
|
357
|
+
description: {
|
|
358
|
+
$ref: '#/visitors/value'
|
|
359
|
+
},
|
|
360
|
+
externalDocs: {
|
|
361
|
+
$ref: '#/visitors/document/objects/ExternalDocumentation'
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
},
|
|
365
|
+
Reference: {
|
|
366
|
+
$visitor: _index15.default,
|
|
367
|
+
fixedFields: {
|
|
368
|
+
$ref: _$RefVisitor2.default
|
|
369
|
+
}
|
|
370
|
+
},
|
|
371
|
+
Schema: {
|
|
372
|
+
$visitor: _index16.default,
|
|
373
|
+
fixedFields: {
|
|
374
|
+
// the following properties are taken directly from the JSON Schema definition and follow the same specifications
|
|
375
|
+
format: jsonSchemaFixedFields.format,
|
|
376
|
+
title: jsonSchemaFixedFields.title,
|
|
377
|
+
description: jsonSchemaFixedFields.description,
|
|
378
|
+
default: jsonSchemaFixedFields.default,
|
|
379
|
+
multipleOf: jsonSchemaFixedFields.multipleOf,
|
|
380
|
+
maximum: jsonSchemaFixedFields.maximum,
|
|
381
|
+
exclusiveMaximum: jsonSchemaFixedFields.exclusiveMaximum,
|
|
382
|
+
minimum: jsonSchemaFixedFields.minimum,
|
|
383
|
+
exclusiveMinimum: jsonSchemaFixedFields.exclusiveMinimum,
|
|
384
|
+
maxLength: jsonSchemaFixedFields.maxLength,
|
|
385
|
+
minLength: jsonSchemaFixedFields.minLength,
|
|
386
|
+
pattern: jsonSchemaFixedFields.pattern,
|
|
387
|
+
maxItems: jsonSchemaFixedFields.maxItems,
|
|
388
|
+
minItems: jsonSchemaFixedFields.minItems,
|
|
389
|
+
uniqueItems: jsonSchemaFixedFields.uniqueItems,
|
|
390
|
+
maxProperties: jsonSchemaFixedFields.maxProperties,
|
|
391
|
+
minProperties: jsonSchemaFixedFields.minProperties,
|
|
392
|
+
required: jsonSchemaFixedFields.required,
|
|
393
|
+
enum: jsonSchemaFixedFields.enum,
|
|
394
|
+
type: jsonSchemaFixedFields.type,
|
|
395
|
+
readOnly: jsonSchemaFixedFields.readOnly,
|
|
396
|
+
// the following properties are taken from the JSON Schema definition but their definitions were adjusted to the Swagger Specification
|
|
397
|
+
items: _ItemsVisitor.default,
|
|
398
|
+
allOf: _AllOfVisitor.default,
|
|
399
|
+
properties: _PropertiesVisitor.default,
|
|
400
|
+
additionalProperties: _SchemaOrJSONReferenceVisitor.default,
|
|
401
|
+
// OpenAPI vocabulary
|
|
402
|
+
discriminator: {
|
|
403
|
+
$ref: '#/visitors/value'
|
|
404
|
+
},
|
|
405
|
+
xml: {
|
|
406
|
+
$ref: '#/visitors/document/objects/XML'
|
|
407
|
+
},
|
|
408
|
+
externalDocs: {
|
|
409
|
+
$ref: '#/visitors/document/objects/ExternalDocumentation'
|
|
410
|
+
},
|
|
411
|
+
example: {
|
|
412
|
+
$ref: '#/visitors/value'
|
|
413
|
+
}
|
|
414
|
+
}
|
|
415
|
+
},
|
|
416
|
+
XML: {
|
|
417
|
+
$visitor: _index17.default,
|
|
418
|
+
fixedFields: {
|
|
419
|
+
name: {
|
|
420
|
+
$ref: '#/visitors/value'
|
|
421
|
+
},
|
|
422
|
+
namespace: {
|
|
423
|
+
$ref: '#/visitors/value'
|
|
424
|
+
},
|
|
425
|
+
prefix: {
|
|
426
|
+
$ref: '#/visitors/value'
|
|
427
|
+
},
|
|
428
|
+
attribute: {
|
|
429
|
+
$ref: '#/visitors/value'
|
|
430
|
+
},
|
|
431
|
+
wrapped: {
|
|
432
|
+
$ref: '#/visitors/value'
|
|
433
|
+
}
|
|
434
|
+
}
|
|
435
|
+
},
|
|
436
|
+
Definitions: {
|
|
437
|
+
$visitor: _index18.default
|
|
438
|
+
},
|
|
439
|
+
ParametersDefinitions: {
|
|
440
|
+
$visitor: _index20.default
|
|
441
|
+
},
|
|
442
|
+
ResponsesDefinitions: {
|
|
443
|
+
$visitor: _index19.default
|
|
444
|
+
},
|
|
445
|
+
SecurityDefinitions: {
|
|
446
|
+
$visitor: _index21.default
|
|
447
|
+
},
|
|
448
|
+
SecurityScheme: {
|
|
449
|
+
$visitor: _index22.default,
|
|
450
|
+
fixedFields: {
|
|
451
|
+
type: {
|
|
452
|
+
$ref: '#/visitors/value'
|
|
453
|
+
},
|
|
454
|
+
description: {
|
|
455
|
+
$ref: '#/visitors/value'
|
|
456
|
+
},
|
|
457
|
+
name: {
|
|
458
|
+
$ref: '#/visitors/value'
|
|
459
|
+
},
|
|
460
|
+
in: {
|
|
461
|
+
$ref: '#/visitors/value'
|
|
462
|
+
},
|
|
463
|
+
flow: {
|
|
464
|
+
$ref: '#/visitors/value'
|
|
465
|
+
},
|
|
466
|
+
authorizationUrl: {
|
|
467
|
+
$ref: '#/visitors/value'
|
|
468
|
+
},
|
|
469
|
+
token: {
|
|
470
|
+
$ref: '#/visitors/value'
|
|
471
|
+
},
|
|
472
|
+
scopes: {
|
|
473
|
+
$ref: '#/visitors/document/objects/Scopes'
|
|
474
|
+
}
|
|
475
|
+
}
|
|
476
|
+
},
|
|
477
|
+
Scopes: {
|
|
478
|
+
$visitor: _index23.default
|
|
479
|
+
},
|
|
480
|
+
SecurityRequirement: {
|
|
481
|
+
$visitor: _index24.default
|
|
482
|
+
}
|
|
483
|
+
},
|
|
484
|
+
extension: {
|
|
485
|
+
$visitor: _SpecificationExtensionVisitor.default
|
|
486
|
+
}
|
|
487
|
+
}
|
|
488
|
+
}
|
|
489
|
+
};
|
|
490
|
+
var _default = exports.default = specification;
|