@redocly/openapi-core 1.18.0 → 1.19.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 +20 -0
- package/lib/benchmark/benches/lint-with-many-rules.bench.js +2 -2
- package/lib/benchmark/benches/lint-with-nested-rule.bench.js +2 -2
- package/lib/benchmark/benches/lint-with-no-rules.bench.js +2 -2
- package/lib/benchmark/benches/lint-with-top-level-rule-report.bench.js +2 -2
- package/lib/benchmark/benches/lint-with-top-level-rule.bench.js +2 -2
- package/lib/benchmark/benches/recommended-oas3.bench.js +2 -2
- package/lib/benchmark/benches/resolve-with-no-external.bench.js +2 -2
- package/lib/benchmark/utils.js +7 -4
- package/lib/bundle.d.ts +3 -3
- package/lib/bundle.js +128 -122
- package/lib/config/all.js +9 -0
- package/lib/config/builtIn.js +7 -1
- package/lib/config/config-resolvers.js +179 -138
- package/lib/config/config.d.ts +2 -2
- package/lib/config/config.js +53 -34
- package/lib/config/load.d.ts +1 -2
- package/lib/config/load.js +105 -117
- package/lib/config/minimal.js +9 -0
- package/lib/config/recommended-strict.js +9 -0
- package/lib/config/recommended.js +9 -0
- package/lib/config/rules.d.ts +3 -3
- package/lib/config/rules.js +1 -2
- package/lib/config/types.d.ts +9 -3
- package/lib/config/utils.js +70 -49
- package/lib/decorators/async3/index.d.ts +1 -0
- package/lib/decorators/async3/index.js +4 -0
- package/lib/decorators/common/filters/filter-helper.js +2 -3
- package/lib/decorators/common/filters/filter-in.js +1 -1
- package/lib/decorators/common/filters/filter-out.js +1 -1
- package/lib/decorators/common/info-override.js +1 -12
- package/lib/decorators/common/media-type-examples-override.js +8 -2
- package/lib/decorators/common/remove-x-internal.js +4 -5
- package/lib/decorators/oas2/remove-unused-components.js +1 -2
- package/lib/decorators/oas3/remove-unused-components.js +1 -2
- package/lib/env.d.ts +0 -1
- package/lib/env.js +1 -1
- package/lib/format/codeframes.js +10 -8
- package/lib/format/format.js +23 -15
- package/lib/index.d.ts +2 -1
- package/lib/index.js +6 -4
- package/lib/js-yaml/index.js +1 -1
- package/lib/lint.d.ts +2 -0
- package/lib/lint.js +92 -99
- package/lib/oas-types.d.ts +9 -5
- package/lib/oas-types.js +22 -12
- package/lib/redocly/domains.js +6 -6
- package/lib/redocly/index.js +60 -73
- package/lib/redocly/registry-api.js +64 -82
- package/lib/ref-utils.js +13 -13
- package/lib/resolve.js +186 -205
- package/lib/rules/ajv.js +10 -8
- package/lib/rules/async3/channels-kebab-case.d.ts +2 -0
- package/lib/rules/async3/channels-kebab-case.js +19 -0
- package/lib/rules/async3/index.d.ts +3 -0
- package/lib/rules/async3/index.js +22 -0
- package/lib/rules/async3/no-channel-trailing-slash.d.ts +2 -0
- package/lib/rules/async3/no-channel-trailing-slash.js +16 -0
- package/lib/rules/common/assertions/asserts.js +5 -5
- package/lib/rules/common/assertions/index.d.ts +5 -4
- package/lib/rules/common/assertions/utils.js +43 -28
- package/lib/rules/common/no-invalid-parameter-examples.js +1 -2
- package/lib/rules/common/no-invalid-schema-examples.js +1 -2
- package/lib/rules/common/no-required-schema-properties-undefined.js +1 -2
- package/lib/rules/common/operation-tag-defined.js +1 -2
- package/lib/rules/common/path-http-verbs-order.js +1 -1
- package/lib/rules/common/path-segment-plural.js +2 -1
- package/lib/rules/common/required-string-property-missing-min-length.js +2 -2
- package/lib/rules/common/response-contains-header.js +2 -2
- package/lib/rules/common/security-defined.js +3 -7
- package/lib/rules/common/spec.d.ts +2 -2
- package/lib/rules/common/spec.js +6 -7
- package/lib/rules/no-unresolved-refs.js +3 -4
- package/lib/rules/oas2/response-contains-property.js +1 -2
- package/lib/rules/oas3/array-parameter-serialization.js +1 -2
- package/lib/rules/oas3/component-name-unique.js +2 -4
- package/lib/rules/oas3/no-invalid-media-type-examples.js +1 -2
- package/lib/rules/oas3/no-server-variables-empty-enum.js +1 -2
- package/lib/rules/oas3/no-undefined-server-variable.js +2 -3
- package/lib/rules/oas3/no-unused-components.js +1 -2
- package/lib/rules/oas3/response-contains-property.js +1 -2
- package/lib/rules/utils.js +14 -12
- package/lib/types/arazzo.d.ts +1299 -73
- package/lib/types/arazzo.js +41 -36
- package/lib/types/asyncapi2.d.ts +17 -0
- package/lib/types/{asyncapi.js → asyncapi2.js} +71 -93
- package/lib/types/asyncapi3.d.ts +2 -0
- package/lib/types/asyncapi3.js +347 -0
- package/lib/types/index.js +19 -10
- package/lib/types/json-schema-adapter.js +4 -18
- package/lib/types/oas2.js +6 -6
- package/lib/types/oas3.js +10 -10
- package/lib/types/oas3_1.js +15 -9
- package/lib/types/redocly-yaml.d.ts +3 -1
- package/lib/types/redocly-yaml.js +131 -35
- package/lib/typings/arazzo.d.ts +28 -1
- package/lib/typings/asyncapi3.d.ts +53 -0
- package/lib/typings/asyncapi3.js +2 -0
- package/lib/utils.d.ts +12 -7
- package/lib/utils.js +91 -77
- package/lib/visitors.d.ts +11 -0
- package/lib/visitors.js +21 -8
- package/lib/walk.js +30 -23
- package/package.json +3 -3
- package/src/__tests__/bundle.test.ts +142 -0
- package/src/__tests__/lint.test.ts +0 -50
- package/src/bundle.ts +19 -6
- package/src/config/__tests__/__snapshots__/config-resolvers.test.ts.snap +22 -0
- package/src/config/__tests__/__snapshots__/config.test.ts.snap +24 -0
- package/src/config/__tests__/config.test.ts +11 -0
- package/src/config/all.ts +9 -0
- package/src/config/builtIn.ts +6 -0
- package/src/config/config-resolvers.ts +15 -2
- package/src/config/config.ts +24 -5
- package/src/config/load.ts +1 -2
- package/src/config/minimal.ts +9 -0
- package/src/config/recommended-strict.ts +9 -0
- package/src/config/recommended.ts +9 -0
- package/src/config/rules.ts +12 -4
- package/src/config/types.ts +15 -2
- package/src/config/utils.ts +15 -0
- package/src/decorators/async3/index.ts +1 -0
- package/src/decorators/common/remove-x-internal.ts +2 -2
- package/src/index.ts +2 -1
- package/src/lint.ts +26 -3
- package/src/oas-types.ts +31 -13
- package/src/rules/arazzo/index.ts +1 -1
- package/src/rules/async2/index.ts +5 -5
- package/src/rules/async3/__tests__/channels-kebab-case.test.ts +141 -0
- package/src/rules/async3/__tests__/no-channel-trailing-slash.test.ts +96 -0
- package/src/rules/async3/channels-kebab-case.ts +19 -0
- package/src/rules/async3/index.ts +23 -0
- package/src/rules/async3/no-channel-trailing-slash.ts +16 -0
- package/src/rules/common/__tests__/spec.test.ts +47 -0
- package/src/rules/common/assertions/index.ts +13 -4
- package/src/rules/common/no-invalid-schema-examples.ts +3 -2
- package/src/rules/common/path-segment-plural.ts +3 -2
- package/src/rules/common/spec.ts +2 -2
- package/src/rules/oas2/index.ts +4 -4
- package/src/rules/oas3/index.ts +39 -37
- package/src/types/arazzo.ts +28 -23
- package/src/types/{asyncapi.ts → asyncapi2.ts} +58 -76
- package/src/types/asyncapi3.ts +381 -0
- package/src/types/oas3_1.ts +3 -2
- package/src/types/redocly-yaml.ts +14 -0
- package/src/typings/arazzo.ts +41 -1
- package/src/typings/asyncapi3.ts +61 -0
- package/src/utils.ts +46 -11
- package/src/visitors.ts +18 -0
- package/tsconfig.tsbuildinfo +1 -1
- package/lib/types/asyncapi.d.ts +0 -2
package/lib/config/utils.js
CHANGED
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
3
|
-
var t = {};
|
|
4
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
-
t[p] = s[p];
|
|
6
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
-
t[p[i]] = s[p[i]];
|
|
10
|
-
}
|
|
11
|
-
return t;
|
|
12
|
-
};
|
|
13
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
-
exports.
|
|
3
|
+
exports.ConfigValidationError = void 0;
|
|
4
|
+
exports.parsePresetName = parsePresetName;
|
|
5
|
+
exports.transformApiDefinitionsToApis = transformApiDefinitionsToApis;
|
|
6
|
+
exports.prefixRules = prefixRules;
|
|
7
|
+
exports.mergeExtends = mergeExtends;
|
|
8
|
+
exports.getMergedConfig = getMergedConfig;
|
|
9
|
+
exports.checkForDeprecatedFields = checkForDeprecatedFields;
|
|
10
|
+
exports.transformConfig = transformConfig;
|
|
11
|
+
exports.getResolveConfig = getResolveConfig;
|
|
12
|
+
exports.getUniquePlugins = getUniquePlugins;
|
|
13
|
+
exports.deepCloneMapWithJSON = deepCloneMapWithJSON;
|
|
15
14
|
const utils_1 = require("../utils");
|
|
16
15
|
const config_1 = require("./config");
|
|
17
16
|
const logger_1 = require("../logger");
|
|
@@ -24,7 +23,6 @@ function parsePresetName(presetName) {
|
|
|
24
23
|
return { pluginId: '', configName: presetName };
|
|
25
24
|
}
|
|
26
25
|
}
|
|
27
|
-
exports.parsePresetName = parsePresetName;
|
|
28
26
|
function transformApiDefinitionsToApis(apiDefinitions) {
|
|
29
27
|
if (!apiDefinitions)
|
|
30
28
|
return undefined;
|
|
@@ -34,10 +32,7 @@ function transformApiDefinitionsToApis(apiDefinitions) {
|
|
|
34
32
|
}
|
|
35
33
|
return apis;
|
|
36
34
|
}
|
|
37
|
-
|
|
38
|
-
function extractFlatConfig(_a) {
|
|
39
|
-
var _b;
|
|
40
|
-
var { plugins, extends: _extends, rules, oas2Rules, oas3_0Rules, oas3_1Rules, async2Rules, arazzoRules, preprocessors, oas2Preprocessors, oas3_0Preprocessors, oas3_1Preprocessors, async2Preprocessors, arazzoPreprocessors, decorators, oas2Decorators, oas3_0Decorators, oas3_1Decorators, async2Decorators, arazzoDecorators } = _a, rawConfigRest = __rest(_a, ["plugins", "extends", "rules", "oas2Rules", "oas3_0Rules", "oas3_1Rules", "async2Rules", "arazzoRules", "preprocessors", "oas2Preprocessors", "oas3_0Preprocessors", "oas3_1Preprocessors", "async2Preprocessors", "arazzoPreprocessors", "decorators", "oas2Decorators", "oas3_0Decorators", "oas3_1Decorators", "async2Decorators", "arazzoDecorators"]);
|
|
35
|
+
function extractFlatConfig({ plugins, extends: _extends, rules, oas2Rules, oas3_0Rules, oas3_1Rules, async2Rules, async3Rules, arazzoRules, preprocessors, oas2Preprocessors, oas3_0Preprocessors, oas3_1Preprocessors, async2Preprocessors, async3Preprocessors, arazzoPreprocessors, decorators, oas2Decorators, oas3_0Decorators, oas3_1Decorators, async2Decorators, async3Decorators, arazzoDecorators, ...rawConfigRest }) {
|
|
41
36
|
const styleguideConfig = {
|
|
42
37
|
plugins,
|
|
43
38
|
extends: _extends,
|
|
@@ -46,20 +41,23 @@ function extractFlatConfig(_a) {
|
|
|
46
41
|
oas3_0Rules,
|
|
47
42
|
oas3_1Rules,
|
|
48
43
|
async2Rules,
|
|
44
|
+
async3Rules,
|
|
49
45
|
arazzoRules,
|
|
50
46
|
preprocessors,
|
|
51
47
|
oas2Preprocessors,
|
|
52
48
|
oas3_0Preprocessors,
|
|
53
49
|
oas3_1Preprocessors,
|
|
54
50
|
async2Preprocessors,
|
|
51
|
+
async3Preprocessors,
|
|
55
52
|
arazzoPreprocessors,
|
|
56
53
|
decorators,
|
|
57
54
|
oas2Decorators,
|
|
58
55
|
oas3_0Decorators,
|
|
59
56
|
oas3_1Decorators,
|
|
60
57
|
async2Decorators,
|
|
58
|
+
async3Decorators,
|
|
61
59
|
arazzoDecorators,
|
|
62
|
-
doNotResolveExamples:
|
|
60
|
+
doNotResolveExamples: rawConfigRest.resolve?.doNotResolveExamples,
|
|
63
61
|
};
|
|
64
62
|
if ((rawConfigRest.lint && rawConfigRest.styleguide) ||
|
|
65
63
|
(Object.values(styleguideConfig).some(utils_1.isDefined) &&
|
|
@@ -77,10 +75,12 @@ function transformApis(legacyApis) {
|
|
|
77
75
|
if (!legacyApis)
|
|
78
76
|
return undefined;
|
|
79
77
|
const apis = {};
|
|
80
|
-
for (
|
|
81
|
-
const [apiName, _b] = _a, { lint } = _b, apiContent = __rest(_b, ["lint"]);
|
|
78
|
+
for (const [apiName, { lint, ...apiContent }] of Object.entries(legacyApis)) {
|
|
82
79
|
const { styleguideConfig, rawConfigRest } = extractFlatConfig(apiContent);
|
|
83
|
-
apis[apiName] =
|
|
80
|
+
apis[apiName] = {
|
|
81
|
+
styleguide: styleguideConfig || lint,
|
|
82
|
+
...rawConfigRest,
|
|
83
|
+
};
|
|
84
84
|
}
|
|
85
85
|
return apis;
|
|
86
86
|
}
|
|
@@ -93,7 +93,6 @@ function prefixRules(rules, prefix) {
|
|
|
93
93
|
}
|
|
94
94
|
return res;
|
|
95
95
|
}
|
|
96
|
-
exports.prefixRules = prefixRules;
|
|
97
96
|
function mergeExtends(rulesConfList) {
|
|
98
97
|
const result = {
|
|
99
98
|
rules: {},
|
|
@@ -101,18 +100,21 @@ function mergeExtends(rulesConfList) {
|
|
|
101
100
|
oas3_0Rules: {},
|
|
102
101
|
oas3_1Rules: {},
|
|
103
102
|
async2Rules: {},
|
|
103
|
+
async3Rules: {},
|
|
104
104
|
arazzoRules: {},
|
|
105
105
|
preprocessors: {},
|
|
106
106
|
oas2Preprocessors: {},
|
|
107
107
|
oas3_0Preprocessors: {},
|
|
108
108
|
oas3_1Preprocessors: {},
|
|
109
109
|
async2Preprocessors: {},
|
|
110
|
+
async3Preprocessors: {},
|
|
110
111
|
arazzoPreprocessors: {},
|
|
111
112
|
decorators: {},
|
|
112
113
|
oas2Decorators: {},
|
|
113
114
|
oas3_0Decorators: {},
|
|
114
115
|
oas3_1Decorators: {},
|
|
115
116
|
async2Decorators: {},
|
|
117
|
+
async3Decorators: {},
|
|
116
118
|
arazzoDecorators: {},
|
|
117
119
|
plugins: [],
|
|
118
120
|
pluginPaths: [],
|
|
@@ -131,6 +133,8 @@ function mergeExtends(rulesConfList) {
|
|
|
131
133
|
(0, utils_1.assignExisting)(result.oas3_1Rules, rulesConf.rules || {});
|
|
132
134
|
Object.assign(result.async2Rules, rulesConf.async2Rules);
|
|
133
135
|
(0, utils_1.assignExisting)(result.async2Rules, rulesConf.rules || {});
|
|
136
|
+
Object.assign(result.async3Rules, rulesConf.async3Rules);
|
|
137
|
+
(0, utils_1.assignExisting)(result.async3Rules, rulesConf.rules || {});
|
|
134
138
|
Object.assign(result.arazzoRules, rulesConf.arazzoRules);
|
|
135
139
|
(0, utils_1.assignExisting)(result.arazzoRules, rulesConf.rules || {});
|
|
136
140
|
Object.assign(result.preprocessors, rulesConf.preprocessors);
|
|
@@ -142,6 +146,8 @@ function mergeExtends(rulesConfList) {
|
|
|
142
146
|
(0, utils_1.assignExisting)(result.oas3_1Preprocessors, rulesConf.preprocessors || {});
|
|
143
147
|
Object.assign(result.async2Preprocessors, rulesConf.async2Preprocessors);
|
|
144
148
|
(0, utils_1.assignExisting)(result.async2Preprocessors, rulesConf.preprocessors || {});
|
|
149
|
+
Object.assign(result.async3Preprocessors, rulesConf.async3Preprocessors);
|
|
150
|
+
(0, utils_1.assignExisting)(result.async3Preprocessors, rulesConf.preprocessors || {});
|
|
145
151
|
Object.assign(result.arazzoPreprocessors, rulesConf.arazzoPreprocessors);
|
|
146
152
|
(0, utils_1.assignExisting)(result.arazzoPreprocessors, rulesConf.preprocessors || {});
|
|
147
153
|
Object.assign(result.decorators, rulesConf.decorators);
|
|
@@ -153,6 +159,8 @@ function mergeExtends(rulesConfList) {
|
|
|
153
159
|
(0, utils_1.assignExisting)(result.oas3_1Decorators, rulesConf.decorators || {});
|
|
154
160
|
Object.assign(result.async2Decorators, rulesConf.async2Decorators);
|
|
155
161
|
(0, utils_1.assignExisting)(result.async2Decorators, rulesConf.decorators || {});
|
|
162
|
+
Object.assign(result.async3Decorators, rulesConf.async3Decorators);
|
|
163
|
+
(0, utils_1.assignExisting)(result.async3Decorators, rulesConf.decorators || {});
|
|
156
164
|
Object.assign(result.arazzoDecorators, rulesConf.arazzoDecorators);
|
|
157
165
|
(0, utils_1.assignExisting)(result.arazzoDecorators, rulesConf.decorators || {});
|
|
158
166
|
result.plugins.push(...(rulesConf.plugins || []));
|
|
@@ -161,29 +169,38 @@ function mergeExtends(rulesConfList) {
|
|
|
161
169
|
}
|
|
162
170
|
return result;
|
|
163
171
|
}
|
|
164
|
-
exports.mergeExtends = mergeExtends;
|
|
165
172
|
function getMergedConfig(config, apiName) {
|
|
166
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
167
173
|
const extendPaths = [
|
|
168
|
-
...Object.values(config.apis).map((api) =>
|
|
169
|
-
|
|
174
|
+
...Object.values(config.apis).map((api) => api?.styleguide?.extendPaths),
|
|
175
|
+
config.rawConfig?.styleguide?.extendPaths,
|
|
170
176
|
]
|
|
171
177
|
.flat()
|
|
172
178
|
.filter(utils_1.isTruthy);
|
|
173
179
|
const pluginPaths = [
|
|
174
|
-
...Object.values(config.apis).map((api) =>
|
|
175
|
-
|
|
180
|
+
...Object.values(config.apis).map((api) => api?.styleguide?.pluginPaths),
|
|
181
|
+
config.rawConfig?.styleguide?.pluginPaths,
|
|
176
182
|
]
|
|
177
183
|
.flat()
|
|
178
184
|
.filter(utils_1.isTruthy);
|
|
179
185
|
return apiName
|
|
180
|
-
? new config_1.Config(
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
186
|
+
? new config_1.Config({
|
|
187
|
+
...config.rawConfig,
|
|
188
|
+
styleguide: {
|
|
189
|
+
...(config.apis[apiName]
|
|
190
|
+
? config.apis[apiName].styleguide
|
|
191
|
+
: config.rawConfig.styleguide),
|
|
192
|
+
extendPaths,
|
|
193
|
+
pluginPaths,
|
|
194
|
+
},
|
|
195
|
+
theme: {
|
|
196
|
+
...config.rawConfig.theme,
|
|
197
|
+
...config.apis[apiName]?.theme,
|
|
198
|
+
},
|
|
199
|
+
files: [...config.files, ...(config.apis?.[apiName]?.files ?? [])],
|
|
200
|
+
// TODO: merge everything else here
|
|
201
|
+
}, config.configFile)
|
|
184
202
|
: config;
|
|
185
203
|
}
|
|
186
|
-
exports.getMergedConfig = getMergedConfig;
|
|
187
204
|
function checkForDeprecatedFields(deprecatedField, updatedField, rawConfig, updatedObject) {
|
|
188
205
|
const isDeprecatedFieldInApis = rawConfig.apis &&
|
|
189
206
|
Object.values(rawConfig.apis).some((api) => api[deprecatedField]);
|
|
@@ -200,9 +217,7 @@ function checkForDeprecatedFields(deprecatedField, updatedField, rawConfig, upda
|
|
|
200
217
|
(0, utils_1.showWarningForDeprecatedField)(deprecatedField, updatedField, updatedObject);
|
|
201
218
|
}
|
|
202
219
|
}
|
|
203
|
-
exports.checkForDeprecatedFields = checkForDeprecatedFields;
|
|
204
220
|
function transformConfig(rawConfig) {
|
|
205
|
-
var _a, _b;
|
|
206
221
|
const migratedFields = [
|
|
207
222
|
['apiDefinitions', 'apis', undefined],
|
|
208
223
|
['referenceDocs', 'openapi', 'theme'],
|
|
@@ -213,21 +228,31 @@ function transformConfig(rawConfig) {
|
|
|
213
228
|
for (const [deprecatedField, updatedField, updatedObject] of migratedFields) {
|
|
214
229
|
checkForDeprecatedFields(deprecatedField, updatedField, rawConfig, updatedObject);
|
|
215
230
|
}
|
|
216
|
-
const { apis, apiDefinitions, referenceDocs, lint
|
|
231
|
+
const { apis, apiDefinitions, referenceDocs, lint, ...rest } = rawConfig;
|
|
217
232
|
const { styleguideConfig, rawConfigRest } = extractFlatConfig(rest);
|
|
218
|
-
const transformedConfig =
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
233
|
+
const transformedConfig = {
|
|
234
|
+
theme: {
|
|
235
|
+
openapi: {
|
|
236
|
+
...referenceDocs,
|
|
237
|
+
...rawConfig['features.openapi'],
|
|
238
|
+
...rawConfig.theme?.openapi,
|
|
239
|
+
},
|
|
240
|
+
mockServer: {
|
|
241
|
+
...rawConfig['features.mockServer'],
|
|
242
|
+
...rawConfig.theme?.mockServer,
|
|
243
|
+
},
|
|
244
|
+
},
|
|
245
|
+
apis: transformApis(apis) || transformApiDefinitionsToApis(apiDefinitions),
|
|
246
|
+
styleguide: styleguideConfig || lint,
|
|
247
|
+
...rawConfigRest,
|
|
248
|
+
};
|
|
222
249
|
showDeprecationMessages(transformedConfig);
|
|
223
250
|
return transformedConfig;
|
|
224
251
|
}
|
|
225
|
-
exports.transformConfig = transformConfig;
|
|
226
252
|
function showDeprecationMessages(config) {
|
|
227
|
-
|
|
228
|
-
let allRules = Object.assign({}, (_a = config.styleguide) === null || _a === void 0 ? void 0 : _a.rules);
|
|
253
|
+
let allRules = { ...config.styleguide?.rules };
|
|
229
254
|
for (const api of Object.values(config.apis || {})) {
|
|
230
|
-
allRules =
|
|
255
|
+
allRules = { ...allRules, ...api?.styleguide?.rules };
|
|
231
256
|
}
|
|
232
257
|
for (const ruleKey of Object.keys(allRules)) {
|
|
233
258
|
if (ruleKey.startsWith('assert/')) {
|
|
@@ -236,15 +261,13 @@ function showDeprecationMessages(config) {
|
|
|
236
261
|
}
|
|
237
262
|
}
|
|
238
263
|
function getResolveConfig(resolve) {
|
|
239
|
-
var _a, _b;
|
|
240
264
|
return {
|
|
241
265
|
http: {
|
|
242
|
-
headers:
|
|
266
|
+
headers: resolve?.http?.headers ?? [],
|
|
243
267
|
customFetch: undefined,
|
|
244
268
|
},
|
|
245
269
|
};
|
|
246
270
|
}
|
|
247
|
-
exports.getResolveConfig = getResolveConfig;
|
|
248
271
|
function getUniquePlugins(plugins) {
|
|
249
272
|
const seen = new Set();
|
|
250
273
|
const results = [];
|
|
@@ -259,11 +282,9 @@ function getUniquePlugins(plugins) {
|
|
|
259
282
|
}
|
|
260
283
|
return results;
|
|
261
284
|
}
|
|
262
|
-
exports.getUniquePlugins = getUniquePlugins;
|
|
263
285
|
class ConfigValidationError extends Error {
|
|
264
286
|
}
|
|
265
287
|
exports.ConfigValidationError = ConfigValidationError;
|
|
266
288
|
function deepCloneMapWithJSON(originalMap) {
|
|
267
289
|
return new Map(JSON.parse(JSON.stringify([...originalMap])));
|
|
268
290
|
}
|
|
269
|
-
exports.deepCloneMapWithJSON = deepCloneMapWithJSON;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const decorators: {};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.filter = filter;
|
|
4
|
+
exports.checkIfMatchByStrategy = checkIfMatchByStrategy;
|
|
4
5
|
const ref_utils_1 = require("../../../ref-utils");
|
|
5
6
|
const utils_1 = require("../../../utils");
|
|
6
7
|
function filter(node, ctx, criteria) {
|
|
@@ -43,7 +44,6 @@ function filter(node, ctx, criteria) {
|
|
|
43
44
|
delete parent[key];
|
|
44
45
|
}
|
|
45
46
|
}
|
|
46
|
-
exports.filter = filter;
|
|
47
47
|
function checkIfMatchByStrategy(nodeValue, decoratorValue, strategy) {
|
|
48
48
|
if (nodeValue === undefined || decoratorValue === undefined) {
|
|
49
49
|
return false;
|
|
@@ -61,7 +61,6 @@ function checkIfMatchByStrategy(nodeValue, decoratorValue, strategy) {
|
|
|
61
61
|
}
|
|
62
62
|
return false;
|
|
63
63
|
}
|
|
64
|
-
exports.checkIfMatchByStrategy = checkIfMatchByStrategy;
|
|
65
64
|
function toArrayIfNeeded(value) {
|
|
66
65
|
return Array.isArray(value) ? value : [value];
|
|
67
66
|
}
|
|
@@ -5,7 +5,7 @@ const filter_helper_1 = require("./filter-helper");
|
|
|
5
5
|
const DEFAULT_STRATEGY = 'any';
|
|
6
6
|
const FilterIn = ({ property, value, matchStrategy }) => {
|
|
7
7
|
const strategy = matchStrategy || DEFAULT_STRATEGY;
|
|
8
|
-
const filterInCriteria = (item) =>
|
|
8
|
+
const filterInCriteria = (item) => item?.[property] && !(0, filter_helper_1.checkIfMatchByStrategy)(item?.[property], value, strategy);
|
|
9
9
|
return {
|
|
10
10
|
any: {
|
|
11
11
|
enter: (node, ctx) => {
|
|
@@ -5,7 +5,7 @@ const filter_helper_1 = require("./filter-helper");
|
|
|
5
5
|
const DEFAULT_STRATEGY = 'any';
|
|
6
6
|
const FilterOut = ({ property, value, matchStrategy }) => {
|
|
7
7
|
const strategy = matchStrategy || DEFAULT_STRATEGY;
|
|
8
|
-
const filterOutCriteria = (item) => (0, filter_helper_1.checkIfMatchByStrategy)(item
|
|
8
|
+
const filterOutCriteria = (item) => (0, filter_helper_1.checkIfMatchByStrategy)(item?.[property], value, strategy);
|
|
9
9
|
return {
|
|
10
10
|
any: {
|
|
11
11
|
enter: (node, ctx) => {
|
|
@@ -1,15 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
3
|
-
var t = {};
|
|
4
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
-
t[p] = s[p];
|
|
6
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
-
t[p[i]] = s[p[i]];
|
|
10
|
-
}
|
|
11
|
-
return t;
|
|
12
|
-
};
|
|
13
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
3
|
exports.InfoOverride = void 0;
|
|
15
4
|
const InfoOverride = (newInfo) => {
|
|
@@ -19,7 +8,7 @@ const InfoOverride = (newInfo) => {
|
|
|
19
8
|
if (typeof newInfo !== 'object' || Array.isArray(newInfo) || newInfo === null) {
|
|
20
9
|
throw new Error(`"info-override" decorator should be called with an object`);
|
|
21
10
|
}
|
|
22
|
-
const { severity: _
|
|
11
|
+
const { severity: _, ...rest } = newInfo;
|
|
23
12
|
Object.assign(info, rest);
|
|
24
13
|
},
|
|
25
14
|
},
|
|
@@ -23,7 +23,10 @@ const MediaTypeExamplesOverride = ({ operationIds }) => {
|
|
|
23
23
|
}
|
|
24
24
|
resolvedResponse.content = resolvedResponse.content ? resolvedResponse.content : {};
|
|
25
25
|
Object.keys(properties.responses[responseCode]).forEach((mimeType) => {
|
|
26
|
-
resolvedResponse.content[mimeType] =
|
|
26
|
+
resolvedResponse.content[mimeType] = {
|
|
27
|
+
...resolvedResponse.content[mimeType],
|
|
28
|
+
examples: (0, utils_1.yamlAndJsonSyncReader)(properties.responses[responseCode][mimeType]),
|
|
29
|
+
};
|
|
27
30
|
});
|
|
28
31
|
operation.responses[responseCode] = resolvedResponse;
|
|
29
32
|
}
|
|
@@ -35,7 +38,10 @@ const MediaTypeExamplesOverride = ({ operationIds }) => {
|
|
|
35
38
|
}
|
|
36
39
|
resolvedRequest.content = resolvedRequest.content ? resolvedRequest.content : {};
|
|
37
40
|
Object.keys(properties.request).forEach((mimeType) => {
|
|
38
|
-
resolvedRequest.content[mimeType] =
|
|
41
|
+
resolvedRequest.content[mimeType] = {
|
|
42
|
+
...resolvedRequest.content[mimeType],
|
|
43
|
+
examples: (0, utils_1.yamlAndJsonSyncReader)(properties.request[mimeType]),
|
|
44
|
+
};
|
|
39
45
|
});
|
|
40
46
|
operation.requestBody = resolvedRequest;
|
|
41
47
|
}
|
|
@@ -7,20 +7,19 @@ const DEFAULT_INTERNAL_PROPERTY_NAME = 'x-internal';
|
|
|
7
7
|
const RemoveXInternal = ({ internalFlagProperty }) => {
|
|
8
8
|
const hiddenTag = internalFlagProperty || DEFAULT_INTERNAL_PROPERTY_NAME;
|
|
9
9
|
function removeInternal(node, ctx) {
|
|
10
|
-
var _a, _b, _c, _d;
|
|
11
10
|
const { parent, key } = ctx;
|
|
12
11
|
let didDelete = false;
|
|
13
12
|
if (Array.isArray(node)) {
|
|
14
13
|
for (let i = 0; i < node.length; i++) {
|
|
15
14
|
if ((0, ref_utils_1.isRef)(node[i])) {
|
|
16
15
|
const resolved = ctx.resolve(node[i]);
|
|
17
|
-
if (
|
|
16
|
+
if (resolved.node?.[hiddenTag]) {
|
|
18
17
|
node.splice(i, 1);
|
|
19
18
|
didDelete = true;
|
|
20
19
|
i--;
|
|
21
20
|
}
|
|
22
21
|
}
|
|
23
|
-
if (
|
|
22
|
+
if (node[i]?.[hiddenTag]) {
|
|
24
23
|
node.splice(i, 1);
|
|
25
24
|
didDelete = true;
|
|
26
25
|
i--;
|
|
@@ -32,12 +31,12 @@ const RemoveXInternal = ({ internalFlagProperty }) => {
|
|
|
32
31
|
node = node;
|
|
33
32
|
if ((0, ref_utils_1.isRef)(node[key])) {
|
|
34
33
|
const resolved = ctx.resolve(node[key]);
|
|
35
|
-
if (
|
|
34
|
+
if (resolved.node?.[hiddenTag]) {
|
|
36
35
|
delete node[key];
|
|
37
36
|
didDelete = true;
|
|
38
37
|
}
|
|
39
38
|
}
|
|
40
|
-
if (
|
|
39
|
+
if (node[key]?.[hiddenTag]) {
|
|
41
40
|
delete node[key];
|
|
42
41
|
didDelete = true;
|
|
43
42
|
}
|
|
@@ -5,9 +5,8 @@ const utils_1 = require("../../utils");
|
|
|
5
5
|
const RemoveUnusedComponents = () => {
|
|
6
6
|
const components = new Map();
|
|
7
7
|
function registerComponent(location, componentType, name) {
|
|
8
|
-
var _a, _b;
|
|
9
8
|
components.set(location.absolutePointer, {
|
|
10
|
-
usedIn:
|
|
9
|
+
usedIn: components.get(location.absolutePointer)?.usedIn ?? [],
|
|
11
10
|
componentType,
|
|
12
11
|
name,
|
|
13
12
|
});
|
|
@@ -5,9 +5,8 @@ const utils_1 = require("../../utils");
|
|
|
5
5
|
const RemoveUnusedComponents = () => {
|
|
6
6
|
const components = new Map();
|
|
7
7
|
function registerComponent(location, componentType, name) {
|
|
8
|
-
var _a, _b;
|
|
9
8
|
components.set(location.absolutePointer, {
|
|
10
|
-
usedIn:
|
|
9
|
+
usedIn: components.get(location.absolutePointer)?.usedIn ?? [],
|
|
11
10
|
componentType,
|
|
12
11
|
name,
|
|
13
12
|
});
|
package/lib/env.d.ts
CHANGED
package/lib/env.js
CHANGED
|
@@ -3,5 +3,5 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.env = exports.isBrowser = void 0;
|
|
4
4
|
exports.isBrowser = typeof window !== 'undefined' ||
|
|
5
5
|
typeof process === 'undefined' ||
|
|
6
|
-
|
|
6
|
+
process?.platform === 'browser'; // main and worker thread
|
|
7
7
|
exports.env = exports.isBrowser ? {} : process.env || {};
|
package/lib/format/codeframes.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.getCodeframe = getCodeframe;
|
|
4
|
+
exports.getLineColLocation = getLineColLocation;
|
|
5
|
+
exports.getAstNodeByPointer = getAstNodeByPointer;
|
|
4
6
|
const yamlAst = require("yaml-ast-parser");
|
|
5
7
|
const ref_utils_1 = require("../ref-utils");
|
|
6
8
|
const logger_1 = require("../logger");
|
|
@@ -66,7 +68,6 @@ function getCodeframe(location, color) {
|
|
|
66
68
|
return (line.substr(0, startIdx) + variant(line.substring(startIdx, endIdx)) + line.substr(endIdx));
|
|
67
69
|
}
|
|
68
70
|
}
|
|
69
|
-
exports.getCodeframe = getCodeframe;
|
|
70
71
|
function printPrefixedLines(lines) {
|
|
71
72
|
const existingLines = lines.filter(([_, line]) => line !== undefined);
|
|
72
73
|
const padLen = Math.max(...existingLines.map(([prefix]) => prefix.length));
|
|
@@ -107,15 +108,17 @@ function padSize(line) {
|
|
|
107
108
|
return line.length;
|
|
108
109
|
}
|
|
109
110
|
function getLineColLocation(location) {
|
|
110
|
-
var _a, _b;
|
|
111
111
|
if (location.pointer === undefined)
|
|
112
112
|
return location;
|
|
113
113
|
const { source, pointer, reportOnKey } = location;
|
|
114
114
|
const ast = source.getAst(yamlAst.safeLoad);
|
|
115
115
|
const astNode = getAstNodeByPointer(ast, pointer, !!reportOnKey);
|
|
116
|
-
return
|
|
116
|
+
return {
|
|
117
|
+
...location,
|
|
118
|
+
pointer: undefined,
|
|
119
|
+
...positionsToLoc(source.body, astNode?.startPosition ?? 1, astNode?.endPosition ?? 1),
|
|
120
|
+
};
|
|
117
121
|
}
|
|
118
|
-
exports.getLineColLocation = getLineColLocation;
|
|
119
122
|
function positionsToLoc(source, startPos, endPos) {
|
|
120
123
|
let currentLine = 1;
|
|
121
124
|
let currentCol = 1;
|
|
@@ -136,7 +139,7 @@ function positionsToLoc(source, startPos, endPos) {
|
|
|
136
139
|
}
|
|
137
140
|
currentCol++;
|
|
138
141
|
}
|
|
139
|
-
const end = startPos === endPos ?
|
|
142
|
+
const end = startPos === endPos ? { ...start } : { line: currentLine, col: currentCol + 1 };
|
|
140
143
|
return { start, end };
|
|
141
144
|
}
|
|
142
145
|
function getAstNodeByPointer(root, pointer, reportOnKey) {
|
|
@@ -151,7 +154,7 @@ function getAstNodeByPointer(root, pointer, reportOnKey) {
|
|
|
151
154
|
if (!mapping)
|
|
152
155
|
break;
|
|
153
156
|
currentNode = mapping;
|
|
154
|
-
if (!
|
|
157
|
+
if (!mapping?.value)
|
|
155
158
|
break; // If node has value - return value, if not - return node itself
|
|
156
159
|
currentNode = mapping.value;
|
|
157
160
|
}
|
|
@@ -180,4 +183,3 @@ function getAstNodeByPointer(root, pointer, reportOnKey) {
|
|
|
180
183
|
}
|
|
181
184
|
}
|
|
182
185
|
}
|
|
183
|
-
exports.getAstNodeByPointer = getAstNodeByPointer;
|
package/lib/format/format.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.getTotals = getTotals;
|
|
4
|
+
exports.formatProblems = formatProblems;
|
|
4
5
|
const path = require("path");
|
|
5
6
|
const logger_1 = require("../logger");
|
|
6
7
|
const output_1 = require("../output");
|
|
@@ -51,7 +52,6 @@ function getTotals(problems) {
|
|
|
51
52
|
ignored,
|
|
52
53
|
};
|
|
53
54
|
}
|
|
54
|
-
exports.getTotals = getTotals;
|
|
55
55
|
function formatProblems(problems, opts) {
|
|
56
56
|
const { maxProblems = 100, cwd = env_1.isBrowser ? '' : process.cwd(), format = 'codeframe', color = logger_1.colorOptions.enabled, totals = getTotals(problems), version = coreVersion, } = opts;
|
|
57
57
|
logger_1.colorOptions.enabled = color; // force colors if specified
|
|
@@ -158,17 +158,27 @@ function formatProblems(problems, opts) {
|
|
|
158
158
|
totals,
|
|
159
159
|
version,
|
|
160
160
|
problems: problems.map((p) => {
|
|
161
|
-
|
|
162
|
-
|
|
161
|
+
const problem = {
|
|
162
|
+
...p,
|
|
163
|
+
location: p.location.map((location) => ({
|
|
164
|
+
...location,
|
|
165
|
+
source: {
|
|
163
166
|
ref: (0, ref_utils_1.isAbsoluteUrl)(location.source.absoluteRef)
|
|
164
167
|
? location.source.absoluteRef
|
|
165
168
|
: path.relative(cwd, location.source.absoluteRef),
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
169
|
+
},
|
|
170
|
+
})),
|
|
171
|
+
from: p.from
|
|
172
|
+
? {
|
|
173
|
+
...p.from,
|
|
174
|
+
source: {
|
|
175
|
+
ref: (0, ref_utils_1.isAbsoluteUrl)(p.from?.source.absoluteRef)
|
|
176
|
+
? p.from?.source.absoluteRef
|
|
177
|
+
: path.relative(cwd, p.from?.source.absoluteRef || cwd),
|
|
178
|
+
},
|
|
179
|
+
}
|
|
180
|
+
: undefined,
|
|
181
|
+
};
|
|
172
182
|
if (env_1.env.FORMAT_JSON_WITH_CODEFRAMES) {
|
|
173
183
|
const location = p.location[0]; // TODO: support multiple locations
|
|
174
184
|
const loc = (0, codeframes_1.getLineColLocation)(location);
|
|
@@ -228,7 +238,6 @@ function formatProblems(problems, opts) {
|
|
|
228
238
|
output_1.output.write(`<error line="${line}" column="${col}" severity="${severity}" message="${message}" source="${source}" />\n`);
|
|
229
239
|
}
|
|
230
240
|
}
|
|
231
|
-
exports.formatProblems = formatProblems;
|
|
232
241
|
function formatSummary(problems) {
|
|
233
242
|
const counts = {};
|
|
234
243
|
for (const problem of problems) {
|
|
@@ -274,7 +283,7 @@ const groupByFiles = (problems) => {
|
|
|
274
283
|
ruleIdPad: 0,
|
|
275
284
|
locationPad: 0,
|
|
276
285
|
};
|
|
277
|
-
const mappedProblem =
|
|
286
|
+
const mappedProblem = { ...problem, location: problem.location.map(codeframes_1.getLineColLocation) };
|
|
278
287
|
fileGroups[absoluteRef].fileProblems.push(mappedProblem);
|
|
279
288
|
fileGroups[absoluteRef].ruleIdPad = Math.max(problem.ruleId.length, fileGroups[absoluteRef].ruleIdPad);
|
|
280
289
|
fileGroups[absoluteRef].locationPad = Math.max(Math.max(...mappedProblem.location.map((loc) => `${loc.start.line}:${loc.start.col}`.length)), fileGroups[absoluteRef].locationPad);
|
|
@@ -301,7 +310,6 @@ function xmlEscape(s) {
|
|
|
301
310
|
});
|
|
302
311
|
}
|
|
303
312
|
function outputForGithubActions(problems, cwd) {
|
|
304
|
-
var _a, _b;
|
|
305
313
|
for (const problem of problems) {
|
|
306
314
|
for (const location of problem.location.map(codeframes_1.getLineColLocation)) {
|
|
307
315
|
let command;
|
|
@@ -322,8 +330,8 @@ function outputForGithubActions(problems, cwd) {
|
|
|
322
330
|
: path.relative(cwd, location.source.absoluteRef),
|
|
323
331
|
line: location.start.line,
|
|
324
332
|
col: location.start.col,
|
|
325
|
-
endLine:
|
|
326
|
-
endColumn:
|
|
333
|
+
endLine: location.end?.line,
|
|
334
|
+
endColumn: location.end?.col,
|
|
327
335
|
};
|
|
328
336
|
output_1.output.write(`::${command} ${formatProperties(properties)}::${escapeMessage(message)}\n`);
|
|
329
337
|
}
|
package/lib/index.d.ts
CHANGED
|
@@ -3,7 +3,8 @@ export { Oas3_1Types } from './types/oas3_1';
|
|
|
3
3
|
export { ArazzoTypes } from './types/arazzo';
|
|
4
4
|
export { Oas3Types } from './types/oas3';
|
|
5
5
|
export { Oas2Types } from './types/oas2';
|
|
6
|
-
export { AsyncApi2Types } from './types/
|
|
6
|
+
export { AsyncApi2Types } from './types/asyncapi2';
|
|
7
|
+
export { AsyncApi3Types } from './types/asyncapi3';
|
|
7
8
|
export { ConfigTypes } from './types/redocly-yaml';
|
|
8
9
|
export type { Oas3Definition, Oas3_1Definition, Oas3Components, Oas3PathItem, Oas3Paths, Oas3ComponentName, Oas3Schema, Oas3_1Schema, Oas3Tag, Oas3_1Webhooks, Referenced, OasRef, } from './typings/openapi';
|
|
9
10
|
export type { Oas2Definition } from './typings/swagger';
|
package/lib/index.js
CHANGED
|
@@ -14,8 +14,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.
|
|
18
|
-
exports.bundleFromString = exports.mapTypeToComponent = exports.bundleDocument = exports.bundle = exports.lintConfig = exports.lintFromString = void 0;
|
|
17
|
+
exports.validate = exports.lint = exports.getTotals = exports.formatProblems = exports.getLineColLocation = exports.getAstNodeByPointer = exports.walkDocument = exports.normalizeVisitors = exports.getTypes = exports.detectSpec = exports.SpecVersion = exports.getMajorSpecVersion = exports.SpecMajorVersion = exports.isAbsoluteUrl = exports.isRef = exports.unescapePointer = exports.stringifyYaml = exports.parseYaml = exports.makeDocumentFromString = exports.YamlParseError = exports.ResolveError = exports.resolveDocument = exports.BaseResolver = exports.Source = exports.RedoclyClient = exports.createConfig = exports.CONFIG_FILE_NAMES = exports.findConfig = exports.getConfig = exports.loadConfig = exports.transformConfig = exports.getMergedConfig = exports.IGNORE_FILE = exports.StyleguideConfig = exports.Config = exports.Stats = exports.normalizeTypes = exports.ConfigTypes = exports.AsyncApi3Types = exports.AsyncApi2Types = exports.Oas2Types = exports.Oas3Types = exports.ArazzoTypes = exports.Oas3_1Types = exports.pause = exports.getProxyAgent = exports.isTruthy = exports.doesYamlFileExist = exports.slash = exports.readFileFromUrl = void 0;
|
|
18
|
+
exports.bundleFromString = exports.mapTypeToComponent = exports.bundleDocument = exports.bundle = exports.lintConfig = exports.lintFromString = exports.lintDocument = void 0;
|
|
19
19
|
var utils_1 = require("./utils");
|
|
20
20
|
Object.defineProperty(exports, "readFileFromUrl", { enumerable: true, get: function () { return utils_1.readFileFromUrl; } });
|
|
21
21
|
Object.defineProperty(exports, "slash", { enumerable: true, get: function () { return utils_1.slash; } });
|
|
@@ -31,8 +31,10 @@ var oas3_1 = require("./types/oas3");
|
|
|
31
31
|
Object.defineProperty(exports, "Oas3Types", { enumerable: true, get: function () { return oas3_1.Oas3Types; } });
|
|
32
32
|
var oas2_1 = require("./types/oas2");
|
|
33
33
|
Object.defineProperty(exports, "Oas2Types", { enumerable: true, get: function () { return oas2_1.Oas2Types; } });
|
|
34
|
-
var
|
|
35
|
-
Object.defineProperty(exports, "AsyncApi2Types", { enumerable: true, get: function () { return
|
|
34
|
+
var asyncapi2_1 = require("./types/asyncapi2");
|
|
35
|
+
Object.defineProperty(exports, "AsyncApi2Types", { enumerable: true, get: function () { return asyncapi2_1.AsyncApi2Types; } });
|
|
36
|
+
var asyncapi3_1 = require("./types/asyncapi3");
|
|
37
|
+
Object.defineProperty(exports, "AsyncApi3Types", { enumerable: true, get: function () { return asyncapi3_1.AsyncApi3Types; } });
|
|
36
38
|
var redocly_yaml_1 = require("./types/redocly-yaml");
|
|
37
39
|
Object.defineProperty(exports, "ConfigTypes", { enumerable: true, get: function () { return redocly_yaml_1.ConfigTypes; } });
|
|
38
40
|
var types_1 = require("./types");
|