@redocly/openapi-core 0.0.0-snapshot.1740665575 → 0.0.0-snapshot.1742384755

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.
Files changed (54) hide show
  1. package/README.md +2 -2
  2. package/lib/bundle.d.ts +0 -2
  3. package/lib/bundle.js +8 -8
  4. package/lib/config/all.js +3 -0
  5. package/lib/config/builtIn.js +5 -3
  6. package/lib/config/config-resolvers.js +47 -13
  7. package/lib/config/config.d.ts +3 -6
  8. package/lib/config/config.js +20 -7
  9. package/lib/config/load.d.ts +1 -5
  10. package/lib/config/load.js +4 -43
  11. package/lib/config/minimal.js +3 -0
  12. package/lib/config/recommended-strict.js +3 -0
  13. package/lib/config/recommended.js +3 -0
  14. package/lib/config/rules.d.ts +2 -2
  15. package/lib/config/spec.js +3 -0
  16. package/lib/config/types.d.ts +8 -10
  17. package/lib/config/utils.js +15 -2
  18. package/lib/decorators/oas2/index.d.ts +0 -1
  19. package/lib/decorators/oas2/index.js +0 -2
  20. package/lib/decorators/oas3/index.d.ts +0 -1
  21. package/lib/decorators/oas3/index.js +0 -2
  22. package/lib/decorators/overlay1/index.d.ts +1 -0
  23. package/lib/{redocly/redocly-client-types.js → decorators/overlay1/index.js} +2 -0
  24. package/lib/index.d.ts +1 -3
  25. package/lib/index.js +2 -19
  26. package/lib/oas-types.d.ts +9 -4
  27. package/lib/oas-types.js +10 -0
  28. package/lib/rules/async3/no-channel-trailing-slash.js +1 -1
  29. package/lib/rules/common/assertions/index.d.ts +2 -2
  30. package/lib/rules/common/no-invalid-schema-examples.d.ts +2 -1
  31. package/lib/rules/common/no-invalid-schema-examples.js +10 -3
  32. package/lib/rules/common/struct.d.ts +2 -2
  33. package/lib/rules/overlay1/index.d.ts +3 -0
  34. package/lib/rules/overlay1/index.js +12 -0
  35. package/lib/rules/respect/respect-supported-versions.js +1 -1
  36. package/lib/types/oas2.js +1 -1
  37. package/lib/types/oas3.js +1 -1
  38. package/lib/types/redocly-yaml.d.ts +2 -0
  39. package/lib/types/redocly-yaml.js +4 -16
  40. package/lib/typings/openapi.d.ts +2 -2
  41. package/lib/utils.js +7 -8
  42. package/lib/visitors.d.ts +11 -0
  43. package/package.json +9 -6
  44. package/lib/decorators/common/registry-dependencies.d.ts +0 -2
  45. package/lib/decorators/common/registry-dependencies.js +0 -24
  46. package/lib/redocly/domains.d.ts +0 -14
  47. package/lib/redocly/domains.js +0 -41
  48. package/lib/redocly/index.d.ts +0 -30
  49. package/lib/redocly/index.js +0 -131
  50. package/lib/redocly/redocly-client-types.d.ts +0 -8
  51. package/lib/redocly/registry-api-types.d.ts +0 -29
  52. package/lib/redocly/registry-api-types.js +0 -2
  53. package/lib/redocly/registry-api.d.ts +0 -17
  54. package/lib/redocly/registry-api.js +0 -100
@@ -1,6 +1,6 @@
1
1
  import type { Location } from '../ref-utils';
2
2
  import type { ProblemSeverity, UserContext } from '../walk';
3
- import type { Oas3PreprocessorsSet, SpecMajorVersion, Oas3DecoratorsSet, Oas2RuleSet, Oas2PreprocessorsSet, Oas2DecoratorsSet, Oas3RuleSet, SpecVersion, Async2PreprocessorsSet, Async2DecoratorsSet, Async2RuleSet, Async3PreprocessorsSet, Async3DecoratorsSet, Async3RuleSet, Arazzo1RuleSet, Arazzo1PreprocessorsSet, Arazzo1DecoratorsSet, RuleMap } from '../oas-types';
3
+ import type { Oas3PreprocessorsSet, SpecMajorVersion, Oas3DecoratorsSet, Oas2RuleSet, Oas2PreprocessorsSet, Oas2DecoratorsSet, Oas3RuleSet, SpecVersion, Async2PreprocessorsSet, Async2DecoratorsSet, Async2RuleSet, Async3PreprocessorsSet, Async3DecoratorsSet, Async3RuleSet, Arazzo1RuleSet, Arazzo1PreprocessorsSet, Arazzo1DecoratorsSet, RuleMap, Overlay1PreprocessorsSet, Overlay1DecoratorsSet, Overlay1RuleSet } from '../oas-types';
4
4
  import type { NodeType } from '../types';
5
5
  import type { SkipFunctionContext } from '../visitors';
6
6
  import type { JSONSchema } from 'json-schema-to-ts';
@@ -27,6 +27,7 @@ export type StyleguideRawConfig<T = undefined> = {
27
27
  async2Rules?: RuleMap<string, RuleConfig, T>;
28
28
  async3Rules?: RuleMap<string, RuleConfig, T>;
29
29
  arazzo1Rules?: RuleMap<string, RuleConfig, T>;
30
+ overlay1Rules?: RuleMap<string, RuleConfig, T>;
30
31
  preprocessors?: Record<string, PreprocessorConfig>;
31
32
  oas2Preprocessors?: Record<string, PreprocessorConfig>;
32
33
  oas3_0Preprocessors?: Record<string, PreprocessorConfig>;
@@ -34,6 +35,7 @@ export type StyleguideRawConfig<T = undefined> = {
34
35
  async2Preprocessors?: Record<string, PreprocessorConfig>;
35
36
  async3Preprocessors?: Record<string, PreprocessorConfig>;
36
37
  arazzo1Preprocessors?: Record<string, PreprocessorConfig>;
38
+ overlay1Preprocessors?: Record<string, PreprocessorConfig>;
37
39
  decorators?: Record<string, DecoratorConfig>;
38
40
  oas2Decorators?: Record<string, DecoratorConfig>;
39
41
  oas3_0Decorators?: Record<string, DecoratorConfig>;
@@ -41,6 +43,7 @@ export type StyleguideRawConfig<T = undefined> = {
41
43
  async2Decorators?: Record<string, DecoratorConfig>;
42
44
  async3Decorators?: Record<string, DecoratorConfig>;
43
45
  arazzo1Decorators?: Record<string, DecoratorConfig>;
46
+ overlay1Decorators?: Record<string, DecoratorConfig>;
44
47
  };
45
48
  export type ApiStyleguideRawConfig = Omit<StyleguideRawConfig, 'plugins'>;
46
49
  export type ResolvedStyleguideConfig = PluginStyleguideConfig & {
@@ -56,6 +59,7 @@ export type PreprocessorsConfig = {
56
59
  async2?: Async2PreprocessorsSet;
57
60
  async3?: Async3PreprocessorsSet;
58
61
  arazzo1?: Arazzo1PreprocessorsSet;
62
+ overlay1?: Overlay1PreprocessorsSet;
59
63
  };
60
64
  export type DecoratorsConfig = {
61
65
  oas3?: Oas3DecoratorsSet;
@@ -63,6 +67,7 @@ export type DecoratorsConfig = {
63
67
  async2?: Async2DecoratorsSet;
64
68
  async3?: Async3DecoratorsSet;
65
69
  arazzo1?: Arazzo1DecoratorsSet;
70
+ overlay1?: Overlay1DecoratorsSet;
66
71
  };
67
72
  export type TypesExtensionFn = (types: Record<string, NodeType>, oasVersion: SpecVersion) => Record<string, NodeType>;
68
73
  export type TypeExtensionsConfig = Partial<Record<SpecMajorVersion, TypesExtensionFn>>;
@@ -72,6 +77,7 @@ export type RulesConfig<T> = {
72
77
  async2?: Async2RuleSet<T>;
73
78
  async3?: Async3RuleSet<T>;
74
79
  arazzo1?: Arazzo1RuleSet<T>;
80
+ overlay1?: Overlay1RuleSet<T>;
75
81
  };
76
82
  export type CustomRulesConfig = RulesConfig<undefined>;
77
83
  export type AssertionContext = Partial<UserContext> & SkipFunctionContext & {
@@ -131,11 +137,7 @@ export type HttpResolveConfig = {
131
137
  export type ResolveConfig = {
132
138
  http: HttpResolveConfig;
133
139
  };
134
- export type Region = 'us' | 'eu';
135
140
  export type Telemetry = 'on' | 'off';
136
- export type AccessTokens = {
137
- [region in Region]?: string;
138
- };
139
141
  export type DeprecatedInRawConfig = {
140
142
  apiDefinitions?: Record<string, string>;
141
143
  lint?: StyleguideRawConfig;
@@ -153,15 +155,11 @@ export type DeprecatedInApi = {
153
155
  } & DeprecatedFeaturesConfig;
154
156
  export type ResolvedApi = Omit<Api, 'styleguide'> & {
155
157
  styleguide: ResolvedStyleguideConfig;
156
- files?: string[];
157
158
  };
158
159
  export type RawConfig = {
159
160
  apis?: Record<string, Api>;
160
161
  styleguide?: StyleguideRawConfig;
161
162
  resolve?: RawResolveConfig;
162
- region?: Region;
163
- organization?: string;
164
- files?: string[];
165
163
  telemetry?: Telemetry;
166
164
  } & ThemeConfig;
167
165
  export type RawUniversalConfig = Omit<RawConfig, 'styleguide'> & StyleguideRawConfig;
@@ -185,5 +183,5 @@ export type ThemeRawConfig = {
185
183
  openapi?: Record<string, any>;
186
184
  mockServer?: Record<string, any>;
187
185
  };
188
- export type RulesFields = 'rules' | 'oas2Rules' | 'oas3_0Rules' | 'oas3_1Rules' | 'async2Rules' | 'async3Rules' | 'arazzo1Rules' | 'preprocessors' | 'oas2Preprocessors' | 'oas3_0Preprocessors' | 'oas3_1Preprocessors' | 'async2Preprocessors' | 'async3Preprocessors' | 'arazzo1Preprocessors' | 'decorators' | 'oas2Decorators' | 'oas3_0Decorators' | 'oas3_1Decorators' | 'async2Decorators' | 'async3Decorators' | 'arazzo1Decorators';
186
+ export type RulesFields = 'rules' | 'oas2Rules' | 'oas3_0Rules' | 'oas3_1Rules' | 'async2Rules' | 'async3Rules' | 'arazzo1Rules' | 'overlay1Rules' | 'preprocessors' | 'oas2Preprocessors' | 'oas3_0Preprocessors' | 'oas3_1Preprocessors' | 'async2Preprocessors' | 'async3Preprocessors' | 'arazzo1Preprocessors' | 'overlay1Preprocessors' | 'decorators' | 'oas2Decorators' | 'oas3_0Decorators' | 'oas3_1Decorators' | 'async2Decorators' | 'async3Decorators' | 'arazzo1Decorators' | 'overlay1Decorators';
189
187
  export {};
@@ -34,7 +34,7 @@ function transformApiDefinitionsToApis(apiDefinitions) {
34
34
  }
35
35
  return apis;
36
36
  }
37
- function extractFlatConfig({ plugins, extends: _extends, rules, oas2Rules, oas3_0Rules, oas3_1Rules, async2Rules, async3Rules, arazzo1Rules, preprocessors, oas2Preprocessors, oas3_0Preprocessors, oas3_1Preprocessors, async2Preprocessors, async3Preprocessors, arazzo1Preprocessors, decorators, oas2Decorators, oas3_0Decorators, oas3_1Decorators, async2Decorators, async3Decorators, arazzo1Decorators, ...rawConfigRest }) {
37
+ function extractFlatConfig({ plugins, extends: _extends, rules, oas2Rules, oas3_0Rules, oas3_1Rules, async2Rules, async3Rules, arazzo1Rules, overlay1Rules, preprocessors, oas2Preprocessors, oas3_0Preprocessors, oas3_1Preprocessors, async2Preprocessors, async3Preprocessors, arazzo1Preprocessors, overlay1Preprocessors, decorators, oas2Decorators, oas3_0Decorators, oas3_1Decorators, async2Decorators, async3Decorators, arazzo1Decorators, overlay1Decorators, ...rawConfigRest }) {
38
38
  const styleguideConfig = {
39
39
  plugins,
40
40
  extends: _extends,
@@ -45,6 +45,7 @@ function extractFlatConfig({ plugins, extends: _extends, rules, oas2Rules, oas3_
45
45
  async2Rules,
46
46
  async3Rules,
47
47
  arazzo1Rules,
48
+ overlay1Rules,
48
49
  preprocessors,
49
50
  oas2Preprocessors,
50
51
  oas3_0Preprocessors,
@@ -52,6 +53,7 @@ function extractFlatConfig({ plugins, extends: _extends, rules, oas2Rules, oas3_
52
53
  async2Preprocessors,
53
54
  async3Preprocessors,
54
55
  arazzo1Preprocessors,
56
+ overlay1Preprocessors,
55
57
  decorators,
56
58
  oas2Decorators,
57
59
  oas3_0Decorators,
@@ -59,6 +61,7 @@ function extractFlatConfig({ plugins, extends: _extends, rules, oas2Rules, oas3_
59
61
  async2Decorators,
60
62
  async3Decorators,
61
63
  arazzo1Decorators,
64
+ overlay1Decorators,
62
65
  doNotResolveExamples: rawConfigRest.resolve?.doNotResolveExamples,
63
66
  };
64
67
  if ((rawConfigRest.lint && rawConfigRest.styleguide) ||
@@ -104,6 +107,7 @@ function mergeExtends(rulesConfList) {
104
107
  async2Rules: {},
105
108
  async3Rules: {},
106
109
  arazzo1Rules: {},
110
+ overlay1Rules: {},
107
111
  preprocessors: {},
108
112
  oas2Preprocessors: {},
109
113
  oas3_0Preprocessors: {},
@@ -111,6 +115,7 @@ function mergeExtends(rulesConfList) {
111
115
  async2Preprocessors: {},
112
116
  async3Preprocessors: {},
113
117
  arazzo1Preprocessors: {},
118
+ overlay1Preprocessors: {},
114
119
  decorators: {},
115
120
  oas2Decorators: {},
116
121
  oas3_0Decorators: {},
@@ -118,6 +123,7 @@ function mergeExtends(rulesConfList) {
118
123
  async2Decorators: {},
119
124
  async3Decorators: {},
120
125
  arazzo1Decorators: {},
126
+ overlay1Decorators: {},
121
127
  plugins: [],
122
128
  pluginPaths: [],
123
129
  extendPaths: [],
@@ -139,6 +145,8 @@ function mergeExtends(rulesConfList) {
139
145
  (0, utils_1.assignOnlyExistingConfig)(result.async3Rules, rulesConf.rules);
140
146
  (0, utils_1.assignConfig)(result.arazzo1Rules, rulesConf.arazzo1Rules);
141
147
  (0, utils_1.assignOnlyExistingConfig)(result.arazzo1Rules, rulesConf.rules);
148
+ (0, utils_1.assignConfig)(result.overlay1Rules, rulesConf.overlay1Rules);
149
+ (0, utils_1.assignOnlyExistingConfig)(result.overlay1Rules, rulesConf.rules);
142
150
  (0, utils_1.assignConfig)(result.preprocessors, rulesConf.preprocessors);
143
151
  (0, utils_1.assignConfig)(result.oas2Preprocessors, rulesConf.oas2Preprocessors);
144
152
  (0, utils_1.assignOnlyExistingConfig)(result.oas2Preprocessors, rulesConf.preprocessors);
@@ -152,6 +160,8 @@ function mergeExtends(rulesConfList) {
152
160
  (0, utils_1.assignOnlyExistingConfig)(result.async3Preprocessors, rulesConf.preprocessors);
153
161
  (0, utils_1.assignConfig)(result.arazzo1Preprocessors, rulesConf.arazzo1Preprocessors);
154
162
  (0, utils_1.assignOnlyExistingConfig)(result.arazzo1Preprocessors, rulesConf.preprocessors);
163
+ (0, utils_1.assignConfig)(result.overlay1Preprocessors, rulesConf.overlay1Preprocessors);
164
+ (0, utils_1.assignOnlyExistingConfig)(result.overlay1Preprocessors, rulesConf.preprocessors);
155
165
  (0, utils_1.assignConfig)(result.decorators, rulesConf.decorators);
156
166
  (0, utils_1.assignConfig)(result.oas2Decorators, rulesConf.oas2Decorators);
157
167
  (0, utils_1.assignOnlyExistingConfig)(result.oas2Decorators, rulesConf.decorators);
@@ -165,6 +175,8 @@ function mergeExtends(rulesConfList) {
165
175
  (0, utils_1.assignOnlyExistingConfig)(result.async3Decorators, rulesConf.decorators);
166
176
  (0, utils_1.assignConfig)(result.arazzo1Decorators, rulesConf.arazzo1Decorators);
167
177
  (0, utils_1.assignOnlyExistingConfig)(result.arazzo1Decorators, rulesConf.decorators);
178
+ (0, utils_1.assignConfig)(result.overlay1Decorators, rulesConf.overlay1Decorators);
179
+ (0, utils_1.assignOnlyExistingConfig)(result.overlay1Decorators, rulesConf.decorators);
168
180
  result.plugins.push(...(rulesConf.plugins || []));
169
181
  result.pluginPaths.push(...(rulesConf.pluginPaths || []));
170
182
  result.extendPaths.push(...new Set(rulesConf.extendPaths));
@@ -194,11 +206,11 @@ function getMergedConfig(config, apiName) {
194
206
  extendPaths,
195
207
  pluginPaths,
196
208
  },
209
+ // FIXME: theme is deprecated
197
210
  theme: {
198
211
  ...config.rawConfig.theme,
199
212
  ...config.apis[apiName]?.theme,
200
213
  },
201
- files: [...config.files, ...(config.apis?.[apiName]?.files ?? [])],
202
214
  // TODO: merge everything else here
203
215
  }, config.configFile)
204
216
  : config;
@@ -243,6 +255,7 @@ function transformConfig(rawConfig) {
243
255
  const { apis, apiDefinitions, referenceDocs, lint, ...rest } = rawConfig;
244
256
  const { styleguideConfig, rawConfigRest } = extractFlatConfig(rest);
245
257
  const transformedConfig = {
258
+ // FIXME: ? theme is deprecated
246
259
  theme: {
247
260
  openapi: {
248
261
  ...referenceDocs,
@@ -1,6 +1,5 @@
1
1
  import type { Oas2Decorator } from '../../visitors';
2
2
  export declare const decorators: {
3
- 'registry-dependencies': Oas2Decorator;
4
3
  'operation-description-override': Oas2Decorator;
5
4
  'tag-description-override': Oas2Decorator;
6
5
  'info-description-override': Oas2Decorator;
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.decorators = void 0;
4
- const registry_dependencies_1 = require("../common/registry-dependencies");
5
4
  const operation_description_override_1 = require("../common/operation-description-override");
6
5
  const tag_description_override_1 = require("../common/tag-description-override");
7
6
  const info_description_override_1 = require("../common/info-description-override");
@@ -10,7 +9,6 @@ const remove_x_internal_1 = require("../common/remove-x-internal");
10
9
  const filter_in_1 = require("../common/filters/filter-in");
11
10
  const filter_out_1 = require("../common/filters/filter-out");
12
11
  exports.decorators = {
13
- 'registry-dependencies': registry_dependencies_1.RegistryDependencies,
14
12
  'operation-description-override': operation_description_override_1.OperationDescriptionOverride,
15
13
  'tag-description-override': tag_description_override_1.TagDescriptionOverride,
16
14
  'info-description-override': info_description_override_1.InfoDescriptionOverride,
@@ -1,6 +1,5 @@
1
1
  import type { Oas3Decorator } from '../../visitors';
2
2
  export declare const decorators: {
3
- 'registry-dependencies': Oas3Decorator;
4
3
  'operation-description-override': Oas3Decorator;
5
4
  'tag-description-override': Oas3Decorator;
6
5
  'info-description-override': Oas3Decorator;
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.decorators = void 0;
4
- const registry_dependencies_1 = require("../common/registry-dependencies");
5
4
  const operation_description_override_1 = require("../common/operation-description-override");
6
5
  const tag_description_override_1 = require("../common/tag-description-override");
7
6
  const info_description_override_1 = require("../common/info-description-override");
@@ -11,7 +10,6 @@ const filter_in_1 = require("../common/filters/filter-in");
11
10
  const filter_out_1 = require("../common/filters/filter-out");
12
11
  const media_type_examples_override_1 = require("../common/media-type-examples-override");
13
12
  exports.decorators = {
14
- 'registry-dependencies': registry_dependencies_1.RegistryDependencies,
15
13
  'operation-description-override': operation_description_override_1.OperationDescriptionOverride,
16
14
  'tag-description-override': tag_description_override_1.TagDescriptionOverride,
17
15
  'info-description-override': info_description_override_1.InfoDescriptionOverride,
@@ -0,0 +1 @@
1
+ export declare const decorators: {};
@@ -1,2 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.decorators = void 0;
4
+ exports.decorators = {};
package/lib/index.d.ts CHANGED
@@ -11,9 +11,7 @@ export type { Oas2Definition } from './typings/swagger';
11
11
  export type { StatsAccumulator, StatsName } from './typings/common';
12
12
  export { normalizeTypes } from './types';
13
13
  export { Stats } from './rules/other/stats';
14
- export { Config, StyleguideConfig, RawConfig, RawUniversalConfig, IGNORE_FILE, Region, getMergedConfig, transformConfig, loadConfig, getConfig, findConfig, CONFIG_FILE_NAMES, RuleSeverity, createConfig, ResolvedApi, } from './config';
15
- export { RedoclyClient } from './redocly';
16
- export * from './redocly/domains';
14
+ export { Config, StyleguideConfig, RawConfig, RawUniversalConfig, IGNORE_FILE, getMergedConfig, transformConfig, loadConfig, getConfig, findConfig, CONFIG_FILE_NAMES, RuleSeverity, createConfig, ResolvedApi, } from './config';
17
15
  export { Source, BaseResolver, Document, resolveDocument, ResolveError, YamlParseError, makeDocumentFromString, } from './resolve';
18
16
  export { parseYaml, stringifyYaml } from './js-yaml';
19
17
  export { unescapePointer, isRef, isAbsoluteUrl } from './ref-utils';
package/lib/index.js CHANGED
@@ -1,21 +1,7 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
2
  Object.defineProperty(exports, "__esModule", { value: true });
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.Arazzo1Types = 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;
3
+ exports.lintDocument = 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.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.Arazzo1Types = exports.Oas3_1Types = exports.pause = exports.getProxyAgent = exports.isTruthy = exports.doesYamlFileExist = exports.slash = exports.readFileFromUrl = void 0;
4
+ exports.bundleFromString = exports.mapTypeToComponent = exports.bundleDocument = exports.bundle = exports.lintConfig = exports.lintFromString = void 0;
19
5
  var utils_1 = require("./utils");
20
6
  Object.defineProperty(exports, "readFileFromUrl", { enumerable: true, get: function () { return utils_1.readFileFromUrl; } });
21
7
  Object.defineProperty(exports, "slash", { enumerable: true, get: function () { return utils_1.slash; } });
@@ -52,9 +38,6 @@ Object.defineProperty(exports, "getConfig", { enumerable: true, get: function ()
52
38
  Object.defineProperty(exports, "findConfig", { enumerable: true, get: function () { return config_1.findConfig; } });
53
39
  Object.defineProperty(exports, "CONFIG_FILE_NAMES", { enumerable: true, get: function () { return config_1.CONFIG_FILE_NAMES; } });
54
40
  Object.defineProperty(exports, "createConfig", { enumerable: true, get: function () { return config_1.createConfig; } });
55
- var redocly_1 = require("./redocly");
56
- Object.defineProperty(exports, "RedoclyClient", { enumerable: true, get: function () { return redocly_1.RedoclyClient; } });
57
- __exportStar(require("./redocly/domains"), exports);
58
41
  var resolve_1 = require("./resolve");
59
42
  Object.defineProperty(exports, "Source", { enumerable: true, get: function () { return resolve_1.Source; } });
60
43
  Object.defineProperty(exports, "BaseResolver", { enumerable: true, get: function () { return resolve_1.BaseResolver; } });
@@ -1,19 +1,21 @@
1
- import type { BuiltInAsync2RuleId, BuiltInAsync3RuleId, BuiltInArazzo1RuleId, BuiltInOAS2RuleId, BuiltInOAS3RuleId } from './types/redocly-yaml';
2
- import type { Oas3Rule, Oas3Preprocessor, Oas2Rule, Oas2Preprocessor, Async2Preprocessor, Async2Rule, Async3Preprocessor, Async3Rule, Arazzo1Preprocessor, Arazzo1Rule } from './visitors';
1
+ import type { BuiltInAsync2RuleId, BuiltInAsync3RuleId, BuiltInArazzo1RuleId, BuiltInOAS2RuleId, BuiltInOAS3RuleId, BuiltInOverlay1RuleId } from './types/redocly-yaml';
2
+ import type { Oas3Rule, Oas3Preprocessor, Oas2Rule, Oas2Preprocessor, Async2Preprocessor, Async2Rule, Async3Preprocessor, Async3Rule, Arazzo1Preprocessor, Arazzo1Rule, Overlay1Preprocessor, Overlay1Rule } from './visitors';
3
3
  export declare enum SpecVersion {
4
4
  OAS2 = "oas2",
5
5
  OAS3_0 = "oas3_0",
6
6
  OAS3_1 = "oas3_1",
7
7
  Async2 = "async2",
8
8
  Async3 = "async3",
9
- Arazzo1 = "arazzo1"
9
+ Arazzo1 = "arazzo1",
10
+ Overlay1 = "overlay1"
10
11
  }
11
12
  export declare enum SpecMajorVersion {
12
13
  OAS2 = "oas2",
13
14
  OAS3 = "oas3",
14
15
  Async2 = "async2",
15
16
  Async3 = "async3",
16
- Arazzo1 = "arazzo1"
17
+ Arazzo1 = "arazzo1",
18
+ Overlay1 = "overlay1"
17
19
  }
18
20
  export type RuleMap<Key extends string, RuleConfig, T> = Record<T extends 'built-in' ? Key : string, RuleConfig>;
19
21
  export type Oas3RuleSet<T = undefined> = RuleMap<BuiltInOAS3RuleId | 'struct' | 'assertions', Oas3Rule, T>;
@@ -21,16 +23,19 @@ export type Oas2RuleSet<T = undefined> = RuleMap<BuiltInOAS2RuleId | 'struct' |
21
23
  export type Async2RuleSet<T = undefined> = RuleMap<BuiltInAsync2RuleId | 'struct' | 'assertions', Async2Rule, T>;
22
24
  export type Async3RuleSet<T = undefined> = RuleMap<BuiltInAsync3RuleId | 'struct' | 'assertions', Async3Rule, T>;
23
25
  export type Arazzo1RuleSet<T = undefined> = RuleMap<BuiltInArazzo1RuleId | 'struct' | 'assertions', Arazzo1Rule, T>;
26
+ export type Overlay1RuleSet<T = undefined> = RuleMap<BuiltInOverlay1RuleId | 'struct' | 'assertions', Overlay1Rule, T>;
24
27
  export type Oas3PreprocessorsSet = Record<string, Oas3Preprocessor>;
25
28
  export type Oas2PreprocessorsSet = Record<string, Oas2Preprocessor>;
26
29
  export type Async2PreprocessorsSet = Record<string, Async2Preprocessor>;
27
30
  export type Async3PreprocessorsSet = Record<string, Async3Preprocessor>;
28
31
  export type Arazzo1PreprocessorsSet = Record<string, Arazzo1Preprocessor>;
32
+ export type Overlay1PreprocessorsSet = Record<string, Overlay1Preprocessor>;
29
33
  export type Oas3DecoratorsSet = Record<string, Oas3Preprocessor>;
30
34
  export type Oas2DecoratorsSet = Record<string, Oas2Preprocessor>;
31
35
  export type Async2DecoratorsSet = Record<string, Async2Preprocessor>;
32
36
  export type Async3DecoratorsSet = Record<string, Async3Preprocessor>;
33
37
  export type Arazzo1DecoratorsSet = Record<string, Arazzo1Preprocessor>;
38
+ export type Overlay1DecoratorsSet = Record<string, Overlay1Preprocessor>;
34
39
  export declare function detectSpec(root: unknown): SpecVersion;
35
40
  export declare function getMajorSpecVersion(version: SpecVersion): SpecMajorVersion;
36
41
  export declare function getTypes(spec: SpecVersion): Record<string, import("./types").NodeType> | Record<"Root" | "Tag" | "TagList" | "ExternalDocs" | "SecurityRequirement" | "SecurityRequirementList" | "Info" | "Contact" | "License" | "Paths" | "PathItem" | "Parameter" | "ParameterList" | "ParameterItems" | "Operation" | "Example" | "ExamplesMap" | "Examples" | "Header" | "Responses" | "Response" | "Schema" | "Xml" | "SchemaProperties" | "NamedSchemas" | "NamedResponses" | "NamedParameters" | "NamedSecuritySchemes" | "SecurityScheme" | "TagGroup" | "TagGroups" | "EnumDescriptions" | "Logo" | "XCodeSample" | "XCodeSampleList" | "XServer" | "XServerList", import("./types").NodeType> | Record<"Root" | "Tag" | "TagList" | "ExternalDocs" | "SecurityRequirement" | "SecurityRequirementList" | "Info" | "Contact" | "License" | "Paths" | "PathItem" | "Parameter" | "ParameterList" | "Operation" | "Example" | "ExamplesMap" | "Header" | "Responses" | "Response" | "Schema" | "Xml" | "SchemaProperties" | "NamedSchemas" | "NamedResponses" | "NamedParameters" | "NamedSecuritySchemes" | "SecurityScheme" | "TagGroup" | "TagGroups" | "EnumDescriptions" | "Logo" | "XCodeSample" | "XCodeSampleList" | "Server" | "ServerList" | "ServerVariable" | "ServerVariablesMap" | "Callback" | "CallbacksMap" | "RequestBody" | "MediaTypesMap" | "MediaType" | "Encoding" | "EncodingMap" | "HeadersMap" | "Link" | "LinksMap" | "DiscriminatorMapping" | "Discriminator" | "Components" | "NamedExamples" | "NamedRequestBodies" | "NamedHeaders" | "NamedLinks" | "NamedCallbacks" | "ImplicitFlow" | "PasswordFlow" | "ClientCredentials" | "AuthorizationCode" | "OAuth2Flows" | "XUsePkce" | "WebhooksMap", import("./types").NodeType> | Record<"Root" | "Info" | "License" | "Operation" | "Schema" | "SchemaProperties" | "SecurityScheme" | "Components" | "PatternProperties" | "NamedPathItems" | "DependentRequired", import("./types").NodeType>;
package/lib/oas-types.js CHANGED
@@ -10,6 +10,7 @@ const oas3_1_1 = require("./types/oas3_1");
10
10
  const asyncapi2_1 = require("./types/asyncapi2");
11
11
  const asyncapi3_1 = require("./types/asyncapi3");
12
12
  const arazzo_1 = require("./types/arazzo");
13
+ const overlay_1 = require("./types/overlay");
13
14
  const utils_1 = require("./utils");
14
15
  const arazzo_2 = require("./typings/arazzo");
15
16
  var SpecVersion;
@@ -20,6 +21,7 @@ var SpecVersion;
20
21
  SpecVersion["Async2"] = "async2";
21
22
  SpecVersion["Async3"] = "async3";
22
23
  SpecVersion["Arazzo1"] = "arazzo1";
24
+ SpecVersion["Overlay1"] = "overlay1";
23
25
  })(SpecVersion || (exports.SpecVersion = SpecVersion = {}));
24
26
  var SpecMajorVersion;
25
27
  (function (SpecMajorVersion) {
@@ -28,6 +30,7 @@ var SpecMajorVersion;
28
30
  SpecMajorVersion["Async2"] = "async2";
29
31
  SpecMajorVersion["Async3"] = "async3";
30
32
  SpecMajorVersion["Arazzo1"] = "arazzo1";
33
+ SpecMajorVersion["Overlay1"] = "overlay1";
31
34
  })(SpecMajorVersion || (exports.SpecMajorVersion = SpecMajorVersion = {}));
32
35
  const typesMap = {
33
36
  [SpecVersion.OAS2]: oas2_1.Oas2Types,
@@ -36,6 +39,7 @@ const typesMap = {
36
39
  [SpecVersion.Async2]: asyncapi2_1.AsyncApi2Types,
37
40
  [SpecVersion.Async3]: asyncapi3_1.AsyncApi3Types,
38
41
  [SpecVersion.Arazzo1]: arazzo_1.Arazzo1Types,
42
+ [SpecVersion.Overlay1]: overlay_1.Overlay1Types,
39
43
  };
40
44
  function detectSpec(root) {
41
45
  if (!(0, utils_1.isPlainObject)(root)) {
@@ -68,6 +72,9 @@ function detectSpec(root) {
68
72
  if (typeof root.arazzo === 'string' && arazzo_2.VERSION_PATTERN.test(root.arazzo)) {
69
73
  return SpecVersion.Arazzo1;
70
74
  }
75
+ if (typeof root.overlay === 'string' && arazzo_2.VERSION_PATTERN.test(root.overlay)) {
76
+ return SpecVersion.Overlay1;
77
+ }
71
78
  throw new Error(`Unsupported specification`);
72
79
  }
73
80
  function getMajorSpecVersion(version) {
@@ -83,6 +90,9 @@ function getMajorSpecVersion(version) {
83
90
  else if (version === SpecVersion.Arazzo1) {
84
91
  return SpecMajorVersion.Arazzo1;
85
92
  }
93
+ else if (version === SpecVersion.Overlay1) {
94
+ return SpecMajorVersion.Overlay1;
95
+ }
86
96
  else {
87
97
  return SpecMajorVersion.OAS3;
88
98
  }
@@ -4,7 +4,7 @@ exports.NoChannelTrailingSlash = void 0;
4
4
  const NoChannelTrailingSlash = () => {
5
5
  return {
6
6
  Channel(channel, { report, location }) {
7
- if (channel.address.endsWith('/') && channel.address !== '/') {
7
+ if (channel?.address?.endsWith('/') && channel?.address !== '/') {
8
8
  report({
9
9
  message: `\`${channel.address}\` should not have a trailing slash.`,
10
10
  location: location.key(),
@@ -1,5 +1,5 @@
1
1
  import type { asserts, AssertionFn } from './asserts';
2
- import type { Arazzo1Visitor, Async2Visitor, Async3Visitor, Oas2Visitor, Oas3Visitor } from '../../../visitors';
2
+ import type { Arazzo1Visitor, Async2Visitor, Async3Visitor, Oas2Visitor, Oas3Visitor, Overlay1Visitor } from '../../../visitors';
3
3
  import type { RuleSeverity } from '../../../config';
4
4
  export type AssertionLocators = {
5
5
  filterInParentKeys?: (string | number)[];
@@ -24,4 +24,4 @@ export type RawAssertion = AssertionDefinition & {
24
24
  export type Assertion = RawAssertion & {
25
25
  assertionId: string;
26
26
  };
27
- export declare const Assertions: (opts: Record<string, Assertion>) => (Oas3Visitor | Oas2Visitor | Async2Visitor | Async3Visitor | Arazzo1Visitor)[];
27
+ export declare const Assertions: (opts: Record<string, Assertion>) => (Oas3Visitor | Oas2Visitor | Async2Visitor | Async3Visitor | Arazzo1Visitor | Overlay1Visitor)[];
@@ -1 +1,2 @@
1
- export declare const NoInvalidSchemaExamples: any;
1
+ import type { Oas2Rule, Oas3Rule } from '../../visitors';
2
+ export declare const NoInvalidSchemaExamples: Oas3Rule | Oas2Rule;
@@ -7,12 +7,19 @@ const NoInvalidSchemaExamples = (opts) => {
7
7
  return {
8
8
  Schema: {
9
9
  leave(schema, ctx) {
10
- if (schema.examples) {
11
- for (const example of schema.examples) {
12
- (0, utils_1.validateExample)(example, schema, ctx.location.child(['examples', schema.examples.indexOf(example)]), ctx, allowAdditionalProperties);
10
+ const examples = schema.examples;
11
+ if (examples) {
12
+ for (const example of examples) {
13
+ (0, utils_1.validateExample)(example, schema, ctx.location.child(['examples', examples.indexOf(example)]), ctx, allowAdditionalProperties);
13
14
  }
14
15
  }
15
16
  if (schema.example !== undefined) {
17
+ // Handle nullable example for OAS3
18
+ if (schema.nullable === true &&
19
+ schema.example === null &&
20
+ schema.type !== undefined) {
21
+ return;
22
+ }
16
23
  (0, utils_1.validateExample)(schema.example, schema, ctx.location.child('example'), ctx, true);
17
24
  }
18
25
  },
@@ -1,2 +1,2 @@
1
- import type { Oas3Rule, Oas2Rule, Async2Rule, Async3Rule, Arazzo1Rule } from '../../visitors';
2
- export declare const Struct: Oas3Rule | Oas2Rule | Async2Rule | Async3Rule | Arazzo1Rule;
1
+ import type { Oas3Rule, Oas2Rule, Async2Rule, Async3Rule, Arazzo1Rule, Overlay1Rule } from '../../visitors';
2
+ export declare const Struct: Oas3Rule | Oas2Rule | Async2Rule | Async3Rule | Arazzo1Rule | Overlay1Rule;
@@ -0,0 +1,3 @@
1
+ import type { Overlay1RuleSet } from '../../oas-types';
2
+ export declare const rules: Overlay1RuleSet<'built-in'>;
3
+ export declare const preprocessors: {};
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.preprocessors = exports.rules = void 0;
4
+ const assertions_1 = require("../common/assertions");
5
+ const info_contact_1 = require("../common/info-contact");
6
+ const struct_1 = require("../common/struct");
7
+ exports.rules = {
8
+ 'info-contact': info_contact_1.InfoContact,
9
+ struct: struct_1.Struct,
10
+ assertions: assertions_1.Assertions,
11
+ };
12
+ exports.preprocessors = {};
@@ -10,7 +10,7 @@ const RespectSupportedVersions = () => {
10
10
  enter(root, { report, location }) {
11
11
  if (!arazzo_1.ARAZZO_VERSIONS_SUPPORTED_BY_RESPECT.includes(root.arazzo)) {
12
12
  report({
13
- message: `Only ${supportedVersions} Arazzo ${(0, utils_1.pluralize)('version is', arazzo_1.ARAZZO_VERSIONS_SUPPORTED_BY_RESPECT.length)} supported by Respect.`,
13
+ message: `Only ${supportedVersions} Arazzo ${(0, utils_1.pluralize)('version is', arazzo_1.ARAZZO_VERSIONS_SUPPORTED_BY_RESPECT.length)} fully supported by Respect.`,
14
14
  location: location.child('arazzo'),
15
15
  });
16
16
  }
package/lib/types/oas2.js CHANGED
@@ -151,7 +151,7 @@ const Parameter = {
151
151
  uniqueItems: { type: 'boolean' },
152
152
  enum: { type: 'array' },
153
153
  multipleOf: { type: 'number' },
154
- 'x-example': 'Example',
154
+ 'x-example': {}, // any
155
155
  'x-examples': 'ExamplesMap',
156
156
  },
157
157
  required(value) {
package/lib/types/oas3.js CHANGED
@@ -301,7 +301,7 @@ const Schema = {
301
301
  required: { type: 'array', items: { type: 'string' } },
302
302
  enum: { type: 'array' },
303
303
  type: {
304
- enum: ['object', 'array', 'string', 'number', 'integer', 'boolean', 'null'],
304
+ enum: ['object', 'array', 'string', 'number', 'integer', 'boolean'],
305
305
  },
306
306
  allOf: (0, _1.listOf)('Schema'),
307
307
  anyOf: (0, _1.listOf)('Schema'),
@@ -11,6 +11,8 @@ export type BuiltInAsync2RuleId = typeof builtInAsync2Rules[number];
11
11
  export type BuiltInAsync3RuleId = typeof builtInAsync3Rules[number];
12
12
  declare const builtInArazzo1Rules: readonly ["sourceDescription-type", "workflowId-unique", "stepId-unique", "sourceDescription-name-unique", "sourceDescriptions-not-empty", "workflow-dependsOn", "parameters-unique", "step-onSuccess-unique", "step-onFailure-unique", "respect-supported-versions", "requestBody-replacements-unique", "no-criteria-xpath", "criteria-unique"];
13
13
  export type BuiltInArazzo1RuleId = typeof builtInArazzo1Rules[number];
14
+ declare const builtInOverlay1Rules: readonly ["info-contact"];
15
+ export type BuiltInOverlay1RuleId = typeof builtInOverlay1Rules[number];
14
16
  declare const oas2NodeTypesList: readonly ["Root", "Tag", "TagList", "ExternalDocs", "SecurityRequirement", "SecurityRequirementList", "Info", "Contact", "License", "Paths", "PathItem", "Parameter", "ParameterList", "ParameterItems", "Operation", "Example", "ExamplesMap", "Examples", "Header", "Responses", "Response", "Schema", "Xml", "SchemaProperties", "NamedSchemas", "NamedResponses", "NamedParameters", "NamedSecuritySchemes", "SecurityScheme", "TagGroup", "TagGroups", "EnumDescriptions", "Logo", "XCodeSample", "XCodeSampleList", "XServer", "XServerList"];
15
17
  export type Oas2NodeType = typeof oas2NodeTypesList[number];
16
18
  declare const oas3NodeTypesList: readonly ["Root", "Tag", "TagList", "ExternalDocs", "Server", "ServerList", "ServerVariable", "ServerVariablesMap", "SecurityRequirement", "SecurityRequirementList", "Info", "Contact", "License", "Paths", "PathItem", "Parameter", "ParameterList", "Operation", "Callback", "CallbacksMap", "RequestBody", "MediaTypesMap", "MediaType", "Example", "ExamplesMap", "Encoding", "EncodingMap", "Header", "HeadersMap", "Responses", "Response", "Link", "LinksMap", "Schema", "Xml", "SchemaProperties", "DiscriminatorMapping", "Discriminator", "Components", "NamedSchemas", "NamedResponses", "NamedParameters", "NamedExamples", "NamedRequestBodies", "NamedHeaders", "NamedSecuritySchemes", "NamedLinks", "NamedCallbacks", "ImplicitFlow", "PasswordFlow", "ClientCredentials", "AuthorizationCode", "OAuth2Flows", "SecurityScheme", "TagGroup", "TagGroups", "EnumDescriptions", "Logo", "XCodeSample", "XCodeSampleList", "XUsePkce", "WebhooksMap"];
@@ -144,12 +144,14 @@ const builtInArazzo1Rules = [
144
144
  'no-criteria-xpath',
145
145
  'criteria-unique',
146
146
  ];
147
+ const builtInOverlay1Rules = ['info-contact'];
147
148
  const builtInRules = [
148
149
  ...builtInOAS2Rules,
149
150
  ...builtInOAS3Rules,
150
151
  ...builtInAsync2Rules,
151
152
  ...builtInAsync3Rules,
152
153
  ...builtInArazzo1Rules,
154
+ ...builtInOverlay1Rules,
153
155
  'spec', // TODO: depricated in favor of struct
154
156
  'struct',
155
157
  ];
@@ -305,8 +307,6 @@ const createConfigRoot = (nodeTypes) => ({
305
307
  apis: 'ConfigApis', // Override apis with internal format
306
308
  'features.openapi': 'ConfigReferenceDocs', // deprecated
307
309
  'features.mockServer': 'ConfigMockServer', // deprecated
308
- organization: { type: 'string' },
309
- region: { enum: ['us', 'eu'] },
310
310
  telemetry: { enum: ['on', 'off'] },
311
311
  resolve: {
312
312
  properties: {
@@ -314,12 +314,6 @@ const createConfigRoot = (nodeTypes) => ({
314
314
  doNotResolveExamples: { type: 'boolean' },
315
315
  },
316
316
  },
317
- files: {
318
- type: 'array',
319
- items: {
320
- type: 'string',
321
- },
322
- },
323
317
  },
324
318
  });
325
319
  const ConfigApis = {
@@ -339,12 +333,6 @@ const createConfigApisProperties = (nodeTypes) => ({
339
333
  ...ConfigStyleguide.properties,
340
334
  'features.openapi': 'ConfigReferenceDocs', // deprecated
341
335
  'features.mockServer': 'ConfigMockServer', // deprecated
342
- files: {
343
- type: 'array',
344
- items: {
345
- type: 'string',
346
- },
347
- },
348
336
  },
349
337
  });
350
338
  const ConfigHTTP = {
@@ -472,7 +460,7 @@ const AssertionDefinitionAssertions = {
472
460
  },
473
461
  additionalProperties: (_value, key) => {
474
462
  if (/^\w+\/\w+$/.test(key))
475
- return { type: 'object' };
463
+ return {};
476
464
  return;
477
465
  },
478
466
  };
@@ -923,7 +911,7 @@ const GenerateCodeSamples = {
923
911
  // TODO: deprecated
924
912
  const ConfigReferenceDocs = {
925
913
  properties: {
926
- theme: 'ConfigTheme',
914
+ theme: 'ConfigTheme', // FIXME: ? theme is deprecated
927
915
  corsProxyUrl: { type: 'string' },
928
916
  ctrlFHijack: { type: 'boolean' },
929
917
  defaultSampleLanguage: { type: 'string' },
@@ -303,12 +303,12 @@ export interface Oas3SecurityRequirement {
303
303
  [name: string]: string[];
304
304
  }
305
305
  export interface Oas3SecurityScheme {
306
- type: 'apiKey' | 'http' | 'oauth2' | 'openIdConnect';
306
+ type: 'apiKey' | 'http' | 'oauth2' | 'openIdConnect' | 'mutualTLS';
307
307
  description?: string;
308
308
  name?: string;
309
309
  in?: 'query' | 'header' | 'cookie';
310
310
  scheme?: string;
311
- bearerFormat: string;
311
+ bearerFormat?: string;
312
312
  flows: {
313
313
  implicit?: {
314
314
  refreshUrl?: string;