@redocly/openapi-core 0.0.0-snapshot.1737627998 → 0.0.0-snapshot.1739895544

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/lib/config/all.js CHANGED
@@ -19,6 +19,7 @@ const all = {
19
19
  'no-enum-type-mismatch': 'error',
20
20
  'no-unresolved-refs': 'error',
21
21
  'no-required-schema-properties-undefined': 'error',
22
+ 'no-schema-type-mismatch': 'error',
22
23
  'operation-summary': 'error',
23
24
  'operation-operationId': 'error',
24
25
  'operation-operationId-unique': 'error',
@@ -75,6 +76,7 @@ const all = {
75
76
  'no-enum-type-mismatch': 'error',
76
77
  'no-unresolved-refs': 'error',
77
78
  'no-required-schema-properties-undefined': 'error',
79
+ 'no-schema-type-mismatch': 'error',
78
80
  'no-invalid-media-type-examples': 'error',
79
81
  'no-server-example.com': 'error',
80
82
  'no-server-trailing-slash': 'error',
@@ -141,6 +143,7 @@ const all = {
141
143
  'no-enum-type-mismatch': 'error',
142
144
  'no-unresolved-refs': 'error',
143
145
  'no-required-schema-properties-undefined': 'error',
146
+ 'no-schema-type-mismatch': 'error',
144
147
  'no-invalid-media-type-examples': 'error',
145
148
  'no-server-example.com': 'error',
146
149
  'no-server-trailing-slash': 'error',
@@ -19,6 +19,7 @@ const minimal = {
19
19
  'no-enum-type-mismatch': 'warn',
20
20
  'no-unresolved-refs': 'error',
21
21
  'no-required-schema-properties-undefined': 'off',
22
+ 'no-schema-type-mismatch': 'off',
22
23
  'operation-summary': 'warn',
23
24
  'operation-operationId': 'warn',
24
25
  'operation-operationId-unique': 'warn',
@@ -66,6 +67,7 @@ const minimal = {
66
67
  'no-enum-type-mismatch': 'warn',
67
68
  'no-unresolved-refs': 'error',
68
69
  'no-required-schema-properties-undefined': 'off',
70
+ 'no-schema-type-mismatch': 'off',
69
71
  'no-invalid-media-type-examples': {
70
72
  severity: 'warn',
71
73
  allowAdditionalProperties: false,
@@ -126,6 +128,7 @@ const minimal = {
126
128
  'no-enum-type-mismatch': 'warn',
127
129
  'no-unresolved-refs': 'error',
128
130
  'no-required-schema-properties-undefined': 'off',
131
+ 'no-schema-type-mismatch': 'off',
129
132
  'no-invalid-media-type-examples': 'warn',
130
133
  'no-server-example.com': 'warn',
131
134
  'no-server-trailing-slash': 'error',
@@ -19,6 +19,7 @@ const recommendedStrict = {
19
19
  'no-enum-type-mismatch': 'error',
20
20
  'no-unresolved-refs': 'error',
21
21
  'no-required-schema-properties-undefined': 'off',
22
+ 'no-schema-type-mismatch': 'error',
22
23
  'operation-summary': 'error',
23
24
  'operation-operationId': 'error',
24
25
  'operation-operationId-unique': 'error',
@@ -66,6 +67,7 @@ const recommendedStrict = {
66
67
  'no-enum-type-mismatch': 'error',
67
68
  'no-unresolved-refs': 'error',
68
69
  'no-required-schema-properties-undefined': 'off',
70
+ 'no-schema-type-mismatch': 'error',
69
71
  'no-invalid-media-type-examples': {
70
72
  severity: 'error',
71
73
  allowAdditionalProperties: false,
@@ -126,6 +128,7 @@ const recommendedStrict = {
126
128
  'no-enum-type-mismatch': 'error',
127
129
  'no-unresolved-refs': 'error',
128
130
  'no-required-schema-properties-undefined': 'off',
131
+ 'no-schema-type-mismatch': 'error',
129
132
  'no-invalid-media-type-examples': 'error',
130
133
  'no-server-example.com': 'error',
131
134
  'no-server-trailing-slash': 'error',
@@ -19,6 +19,7 @@ const recommended = {
19
19
  'no-enum-type-mismatch': 'error',
20
20
  'no-unresolved-refs': 'error',
21
21
  'no-required-schema-properties-undefined': 'off',
22
+ 'no-schema-type-mismatch': 'warn',
22
23
  'operation-summary': 'error',
23
24
  'operation-description': 'off',
24
25
  'operation-operationId': 'warn',
@@ -66,6 +67,7 @@ const recommended = {
66
67
  'no-enum-type-mismatch': 'error',
67
68
  'no-unresolved-refs': 'error',
68
69
  'no-required-schema-properties-undefined': 'off',
70
+ 'no-schema-type-mismatch': 'warn',
69
71
  'no-invalid-media-type-examples': {
70
72
  severity: 'warn',
71
73
  allowAdditionalProperties: false,
@@ -126,6 +128,7 @@ const recommended = {
126
128
  'no-enum-type-mismatch': 'error',
127
129
  'no-unresolved-refs': 'error',
128
130
  'no-required-schema-properties-undefined': 'off',
131
+ 'no-schema-type-mismatch': 'warn',
129
132
  'no-invalid-media-type-examples': 'warn',
130
133
  'no-server-example.com': 'warn',
131
134
  'no-server-trailing-slash': 'error',
package/lib/logger.d.ts CHANGED
@@ -1,5 +1,7 @@
1
1
  import * as colorette from 'colorette';
2
- export { options as colorOptions } from 'colorette';
2
+ export declare const colorOptions: {
3
+ enabled: boolean;
4
+ };
3
5
  export declare const colorize: typeof colorette;
4
6
  declare class Logger {
5
7
  protected stderr(str: string): boolean;
@@ -8,3 +10,4 @@ declare class Logger {
8
10
  error(str: string): boolean | void;
9
11
  }
10
12
  export declare const logger: Logger;
13
+ export {};
package/lib/logger.js CHANGED
@@ -4,8 +4,9 @@ exports.logger = exports.colorize = exports.colorOptions = void 0;
4
4
  const colorette = require("colorette");
5
5
  const env_1 = require("./env");
6
6
  const utils_1 = require("./utils");
7
- var colorette_1 = require("colorette");
8
- Object.defineProperty(exports, "colorOptions", { enumerable: true, get: function () { return colorette_1.options; } });
7
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
8
+ // @ts-ignore this works but some types are not working
9
+ exports.colorOptions = colorette.options;
9
10
  exports.colorize = new Proxy(colorette, {
10
11
  get(target, prop) {
11
12
  if (env_1.isBrowser) {
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.RegistryApi = void 0;
4
- const node_fetch_1 = require("node-fetch");
5
4
  const utils_1 = require("../utils");
6
5
  const domains_1 = require("./domains");
7
6
  const version = require('../../package.json').version;
@@ -30,7 +29,12 @@ class RegistryApi {
30
29
  if (!headers.hasOwnProperty('authorization')) {
31
30
  throw new Error('Unauthorized');
32
31
  }
33
- const response = await (0, node_fetch_1.default)(`${this.getBaseUrl()}${path}`, Object.assign({}, options, { headers, agent: (0, utils_1.getProxyAgent)() }));
32
+ const requestOptions = {
33
+ ...options,
34
+ headers,
35
+ agent: (0, utils_1.getProxyAgent)(),
36
+ };
37
+ const response = await fetch(`${this.getBaseUrl()}${path}`, requestOptions);
34
38
  if (response.status === 401) {
35
39
  throw new Error('Unauthorized');
36
40
  }
package/lib/rules/ajv.js CHANGED
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.releaseAjvInstance = releaseAjvInstance;
4
4
  exports.validateJsonSchema = validateJsonSchema;
5
5
  const _2020_1 = require("@redocly/ajv/dist/2020");
6
- const ajv_formats_1 = require("ajv-formats");
7
6
  const ref_utils_1 = require("../ref-utils");
8
7
  let ajvInstance = null;
9
8
  function releaseAjvInstance() {
@@ -20,7 +19,7 @@ function getAjv(resolve, allowAdditionalProperties) {
20
19
  validateSchema: false,
21
20
  discriminator: true,
22
21
  allowUnionTypes: true,
23
- validateFormats: true,
22
+ validateFormats: false, // TODO: fix it
24
23
  defaultUnevaluatedProperties: allowAdditionalProperties,
25
24
  loadSchemaSync(base, $ref, $id) {
26
25
  const resolvedRef = resolve({ $ref }, base.split('#')[0]);
@@ -30,7 +29,6 @@ function getAjv(resolve, allowAdditionalProperties) {
30
29
  },
31
30
  logger: false,
32
31
  });
33
- (0, ajv_formats_1.default)(ajvInstance); // FIXME: type mismatch
34
32
  }
35
33
  return ajvInstance;
36
34
  }
@@ -0,0 +1,2 @@
1
+ import type { Oas2Rule, Oas3Rule } from '../../visitors';
2
+ export declare const NoSchemaTypeMismatch: Oas3Rule | Oas2Rule;
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.NoSchemaTypeMismatch = void 0;
4
+ const NoSchemaTypeMismatch = () => {
5
+ return {
6
+ Schema(schema, { report, location }) {
7
+ if (schema.type === 'object' && schema.items) {
8
+ report({
9
+ message: "Schema type mismatch: 'object' type should not contain 'items' field.",
10
+ location: location.child('items'),
11
+ });
12
+ }
13
+ if (schema.type === 'array' && schema.properties) {
14
+ report({
15
+ message: "Schema type mismatch: 'array' type should not contain 'properties' field.",
16
+ location: location.child('properties'),
17
+ });
18
+ }
19
+ },
20
+ };
21
+ };
22
+ exports.NoSchemaTypeMismatch = NoSchemaTypeMismatch;
@@ -8,7 +8,7 @@ const OperationTagDefined = () => {
8
8
  definedTags = new Set((root.tags ?? []).map((t) => t.name));
9
9
  },
10
10
  Operation(operation, { report, location }) {
11
- if (operation.tags) {
11
+ if (operation?.tags) {
12
12
  for (let i = 0; i < operation.tags.length; i++) {
13
13
  if (!definedTags.has(operation.tags[i])) {
14
14
  report({
@@ -18,6 +18,12 @@ const OperationTagDefined = () => {
18
18
  }
19
19
  }
20
20
  }
21
+ else {
22
+ report({
23
+ message: `Operation tags should be defined`,
24
+ location: location.key(),
25
+ });
26
+ }
21
27
  },
22
28
  };
23
29
  };
@@ -45,6 +45,7 @@ const scalar_property_missing_example_1 = require("../common/scalar-property-mis
45
45
  const required_string_property_missing_min_length_1 = require("../common/required-string-property-missing-min-length");
46
46
  const spec_strict_refs_1 = require("../common/spec-strict-refs");
47
47
  const no_required_schema_properties_undefined_1 = require("../common/no-required-schema-properties-undefined");
48
+ const no_schema_type_mismatch_1 = require("../common/no-schema-type-mismatch");
48
49
  exports.rules = {
49
50
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
50
51
  //@ts-ignore TODO: This is depricated property `spec` and should be removed in the future
@@ -94,5 +95,6 @@ exports.rules = {
94
95
  'required-string-property-missing-min-length': required_string_property_missing_min_length_1.RequiredStringPropertyMissingMinLength,
95
96
  'spec-strict-refs': spec_strict_refs_1.SpecStrictRefs,
96
97
  'no-required-schema-properties-undefined': no_required_schema_properties_undefined_1.NoRequiredSchemaPropertiesUndefined,
98
+ 'no-schema-type-mismatch': no_schema_type_mismatch_1.NoSchemaTypeMismatch,
97
99
  };
98
100
  exports.preprocessors = {};
@@ -57,6 +57,7 @@ const spec_strict_refs_1 = require("../common/spec-strict-refs");
57
57
  const component_name_unique_1 = require("./component-name-unique");
58
58
  const array_parameter_serialization_1 = require("./array-parameter-serialization");
59
59
  const no_required_schema_properties_undefined_1 = require("../common/no-required-schema-properties-undefined");
60
+ const no_schema_type_mismatch_1 = require("../common/no-schema-type-mismatch");
60
61
  exports.rules = {
61
62
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
62
63
  //@ts-ignore TODO: This is depricated property `spec` and should be removed in the future
@@ -118,5 +119,6 @@ exports.rules = {
118
119
  'component-name-unique': component_name_unique_1.ComponentNameUnique,
119
120
  'array-parameter-serialization': array_parameter_serialization_1.ArrayParameterSerialization,
120
121
  'no-required-schema-properties-undefined': no_required_schema_properties_undefined_1.NoRequiredSchemaPropertiesUndefined,
122
+ 'no-schema-type-mismatch': no_schema_type_mismatch_1.NoSchemaTypeMismatch,
121
123
  };
122
124
  exports.preprocessors = {};
@@ -175,19 +175,21 @@ const ExtendedOperation = {
175
175
  'put',
176
176
  'delete',
177
177
  'patch',
178
+ 'head',
179
+ 'options',
180
+ 'trace',
181
+ 'connect',
182
+ 'query',
178
183
  'GET',
179
184
  'POST',
180
185
  'PUT',
181
186
  'DELETE',
182
187
  'PATCH',
183
- 'options',
184
188
  'OPTIONS',
185
- 'head',
186
189
  'HEAD',
187
- 'trace',
188
190
  'TRACE',
189
- 'connect',
190
191
  'CONNECT',
192
+ 'QUERY',
191
193
  ],
192
194
  },
193
195
  },
@@ -0,0 +1,2 @@
1
+ import { type NodeType } from '.';
2
+ export declare const Overlay1Types: Record<string, NodeType>;
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Overlay1Types = void 0;
4
+ const _1 = require(".");
5
+ const Root = {
6
+ properties: {
7
+ overlay: { type: 'string' },
8
+ info: 'Info',
9
+ extends: { type: 'string' },
10
+ actions: 'Actions',
11
+ },
12
+ required: ['overlay', 'info', 'actions'],
13
+ extensionsPrefix: 'x-',
14
+ };
15
+ const Info = {
16
+ properties: {
17
+ title: { type: 'string' },
18
+ version: { type: 'string' },
19
+ },
20
+ required: ['title', 'version'],
21
+ extensionsPrefix: 'x-',
22
+ };
23
+ const Actions = (0, _1.listOf)('Action');
24
+ const Action = {
25
+ properties: {
26
+ target: { type: 'string' },
27
+ description: { type: 'string' },
28
+ update: {}, // any
29
+ remove: { type: 'boolean' },
30
+ },
31
+ required: ['target'],
32
+ extensionsPrefix: 'x-',
33
+ };
34
+ exports.Overlay1Types = {
35
+ Root,
36
+ Info,
37
+ Actions,
38
+ Action,
39
+ };
@@ -1,9 +1,9 @@
1
1
  import type { JSONSchema } from 'json-schema-to-ts';
2
2
  import type { NodeType } from '.';
3
3
  import type { Config } from '../config';
4
- declare const builtInOAS2Rules: readonly ["info-contact", "operation-operationId", "tag-description", "tags-alphabetical", "info-license-url", "info-license-strict", "info-license", "no-ambiguous-paths", "no-enum-type-mismatch", "no-http-verbs-in-paths", "no-identical-paths", "no-invalid-parameter-examples", "no-invalid-schema-examples", "no-path-trailing-slash", "operation-2xx-response", "operation-4xx-response", "operation-description", "operation-operationId-unique", "operation-operationId-url-safe", "operation-parameters-unique", "operation-singular-tag", "operation-summary", "operation-tag-defined", "parameter-description", "path-declaration-must-exist", "path-excludes-patterns", "path-http-verbs-order", "path-not-include-query", "path-params-defined", "path-parameters-defined", "path-segment-plural", "paths-kebab-case", "required-string-property-missing-min-length", "response-contains-header", "scalar-property-missing-example", "security-defined", "spec-strict-refs", "no-unresolved-refs", "no-required-schema-properties-undefined", "boolean-parameter-prefixes", "request-mime-type", "response-contains-property", "response-mime-type"];
4
+ declare const builtInOAS2Rules: readonly ["info-contact", "operation-operationId", "tag-description", "tags-alphabetical", "info-license-url", "info-license-strict", "info-license", "no-ambiguous-paths", "no-enum-type-mismatch", "no-http-verbs-in-paths", "no-identical-paths", "no-invalid-parameter-examples", "no-invalid-schema-examples", "no-path-trailing-slash", "operation-2xx-response", "operation-4xx-response", "operation-description", "operation-operationId-unique", "operation-operationId-url-safe", "operation-parameters-unique", "operation-singular-tag", "operation-summary", "operation-tag-defined", "parameter-description", "path-declaration-must-exist", "path-excludes-patterns", "path-http-verbs-order", "path-not-include-query", "path-params-defined", "path-parameters-defined", "path-segment-plural", "paths-kebab-case", "required-string-property-missing-min-length", "response-contains-header", "scalar-property-missing-example", "security-defined", "spec-strict-refs", "no-unresolved-refs", "no-required-schema-properties-undefined", "no-schema-type-mismatch", "boolean-parameter-prefixes", "request-mime-type", "response-contains-property", "response-mime-type"];
5
5
  export type BuiltInOAS2RuleId = typeof builtInOAS2Rules[number];
6
- declare const builtInOAS3Rules: readonly ["info-contact", "operation-operationId", "tag-description", "tags-alphabetical", "info-license-url", "info-license-strict", "info-license", "no-ambiguous-paths", "no-enum-type-mismatch", "no-http-verbs-in-paths", "no-identical-paths", "no-invalid-parameter-examples", "no-invalid-schema-examples", "no-path-trailing-slash", "operation-2xx-response", "operation-4xx-response", "operation-description", "operation-operationId-unique", "operation-operationId-url-safe", "operation-parameters-unique", "operation-singular-tag", "operation-summary", "operation-tag-defined", "parameter-description", "path-declaration-must-exist", "path-excludes-patterns", "path-http-verbs-order", "path-not-include-query", "path-params-defined", "path-parameters-defined", "path-segment-plural", "paths-kebab-case", "required-string-property-missing-min-length", "response-contains-header", "scalar-property-missing-example", "security-defined", "spec-strict-refs", "no-unresolved-refs", "no-required-schema-properties-undefined", "boolean-parameter-prefixes", "component-name-unique", "no-empty-servers", "no-example-value-and-externalValue", "no-invalid-media-type-examples", "no-server-example.com", "no-server-trailing-slash", "no-server-variables-empty-enum", "no-undefined-server-variable", "no-unused-components", "operation-4xx-problem-details-rfc7807", "request-mime-type", "response-contains-property", "response-mime-type", "spec-components-invalid-map-name", "array-parameter-serialization"];
6
+ declare const builtInOAS3Rules: readonly ["info-contact", "operation-operationId", "tag-description", "tags-alphabetical", "info-license-url", "info-license-strict", "info-license", "no-ambiguous-paths", "no-enum-type-mismatch", "no-http-verbs-in-paths", "no-identical-paths", "no-invalid-parameter-examples", "no-invalid-schema-examples", "no-path-trailing-slash", "operation-2xx-response", "operation-4xx-response", "operation-description", "operation-operationId-unique", "operation-operationId-url-safe", "operation-parameters-unique", "operation-singular-tag", "operation-summary", "operation-tag-defined", "parameter-description", "path-declaration-must-exist", "path-excludes-patterns", "path-http-verbs-order", "path-not-include-query", "path-params-defined", "path-parameters-defined", "path-segment-plural", "paths-kebab-case", "required-string-property-missing-min-length", "response-contains-header", "scalar-property-missing-example", "security-defined", "spec-strict-refs", "no-unresolved-refs", "no-required-schema-properties-undefined", "no-schema-type-mismatch", "boolean-parameter-prefixes", "component-name-unique", "no-empty-servers", "no-example-value-and-externalValue", "no-invalid-media-type-examples", "no-server-example.com", "no-server-trailing-slash", "no-server-variables-empty-enum", "no-undefined-server-variable", "no-unused-components", "operation-4xx-problem-details-rfc7807", "request-mime-type", "response-contains-property", "response-mime-type", "spec-components-invalid-map-name", "array-parameter-serialization"];
7
7
  export type BuiltInOAS3RuleId = typeof builtInOAS3Rules[number];
8
8
  declare const builtInAsync2Rules: readonly ["info-contact", "info-license-strict", "operation-operationId", "tag-description", "tags-alphabetical", "channels-kebab-case", "no-channel-trailing-slash"];
9
9
  declare const builtInAsync3Rules: readonly ["info-contact", "info-license-strict", "operation-operationId", "tag-description", "tags-alphabetical", "channels-kebab-case", "no-channel-trailing-slash"];
@@ -4,9 +4,9 @@ exports.ConfigTypes = void 0;
4
4
  exports.createConfigTypes = createConfigTypes;
5
5
  const config_1 = require("@redocly/config");
6
6
  const _1 = require(".");
7
+ const oas_types_1 = require("../oas-types");
7
8
  const utils_1 = require("../utils");
8
9
  const json_schema_adapter_1 = require("./json-schema-adapter");
9
- const oas_types_1 = require("../oas-types");
10
10
  const builtInOAS2Rules = [
11
11
  'info-contact',
12
12
  'operation-operationId',
@@ -47,6 +47,7 @@ const builtInOAS2Rules = [
47
47
  'spec-strict-refs',
48
48
  'no-unresolved-refs',
49
49
  'no-required-schema-properties-undefined',
50
+ 'no-schema-type-mismatch',
50
51
  'boolean-parameter-prefixes',
51
52
  'request-mime-type',
52
53
  'response-contains-property',
@@ -92,6 +93,7 @@ const builtInOAS3Rules = [
92
93
  'spec-strict-refs',
93
94
  'no-unresolved-refs',
94
95
  'no-required-schema-properties-undefined',
96
+ 'no-schema-type-mismatch',
95
97
  'boolean-parameter-prefixes',
96
98
  'component-name-unique',
97
99
  'no-empty-servers',
@@ -359,11 +361,21 @@ const Rules = {
359
361
  properties: {},
360
362
  additionalProperties: (value, key) => {
361
363
  if (key.startsWith('rule/')) {
362
- return 'Assert';
364
+ if (typeof value === 'string') {
365
+ return { enum: ['error', 'warn', 'off'] };
366
+ }
367
+ else {
368
+ return 'Assert';
369
+ }
363
370
  }
364
371
  else if (key.startsWith('assert/')) {
365
372
  // keep the old assert/ prefix as an alias
366
- return 'Assert';
373
+ if (typeof value === 'string') {
374
+ return { enum: ['error', 'warn', 'off'] };
375
+ }
376
+ else {
377
+ return 'Assert';
378
+ }
367
379
  }
368
380
  else if (builtInRules.includes(key) || (0, utils_1.isCustomRuleId)(key)) {
369
381
  if (typeof value === 'string') {
@@ -24,7 +24,7 @@ export interface Parameter {
24
24
  }
25
25
  export interface ExtendedOperation {
26
26
  url: string;
27
- method: 'get' | 'post' | 'put' | 'delete' | 'patch' | 'head' | 'options' | 'trace' | 'connect' | 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS' | 'TRACE' | 'CONNECT';
27
+ method: 'get' | 'post' | 'put' | 'delete' | 'patch' | 'head' | 'options' | 'trace' | 'connect' | 'query' | 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS' | 'TRACE' | 'CONNECT' | 'QUERY';
28
28
  }
29
29
  export interface Replacement {
30
30
  target: string;
@@ -103,7 +103,7 @@ export interface Workflow {
103
103
  failureActions?: OnFailureObject[];
104
104
  }
105
105
  export interface ArazzoDefinition {
106
- arazzo: '1.0.0';
106
+ arazzo: '1.0.1';
107
107
  info: InfoObject;
108
108
  sourceDescriptions: SourceDescription[];
109
109
  workflows: Workflow[];
@@ -2,4 +2,4 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ARAZZO_VERSIONS_SUPPORTED_BY_SPOT = exports.VERSION_PATTERN = void 0;
4
4
  exports.VERSION_PATTERN = /^1\.0\.\d+(-.+)?$/;
5
- exports.ARAZZO_VERSIONS_SUPPORTED_BY_SPOT = ['1.0.0'];
5
+ exports.ARAZZO_VERSIONS_SUPPORTED_BY_SPOT = ['1.0.1'];
@@ -0,0 +1,17 @@
1
+ export interface InfoObject {
2
+ title: string;
3
+ version: string;
4
+ }
5
+ export interface ActionObject {
6
+ target: string;
7
+ description?: string;
8
+ update?: unknown;
9
+ remove?: boolean;
10
+ }
11
+ export interface Overlay1Definition {
12
+ overlay: '1.0.0';
13
+ info: InfoObject;
14
+ extends?: string;
15
+ actions: ActionObject[];
16
+ }
17
+ export declare const VERSION_PATTERN: RegExp;
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.VERSION_PATTERN = void 0;
4
+ exports.VERSION_PATTERN = /^1\.0\.\d+(-.+)?$/;
package/lib/utils.js CHANGED
@@ -40,7 +40,6 @@ exports.dequal = dequal;
40
40
  const fs = require("fs");
41
41
  const path_1 = require("path");
42
42
  const minimatch = require("minimatch");
43
- const node_fetch_1 = require("node-fetch");
44
43
  const js_yaml_1 = require("./js-yaml");
45
44
  const env_1 = require("./env");
46
45
  const logger_1 = require("./logger");
@@ -91,7 +90,7 @@ async function readFileFromUrl(url, config) {
91
90
  header.envVariable !== undefined ? env_1.env[header.envVariable] || '' : header.value;
92
91
  }
93
92
  }
94
- const req = await (config.customFetch || node_fetch_1.default)(url, {
93
+ const req = await (config.customFetch || fetch)(url, {
95
94
  headers: headers,
96
95
  });
97
96
  if (!req.ok) {
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@redocly/openapi-core",
3
- "version": "0.0.0-snapshot.1737627998",
3
+ "version": "0.0.0-snapshot.1739895544",
4
4
  "description": "",
5
5
  "main": "lib/index.js",
6
6
  "engines": {
7
- "node": ">=14.19.0",
8
- "npm": ">=7.0.0"
7
+ "node": ">=18.17.0",
8
+ "npm": ">=9.5.0"
9
9
  },
10
10
  "engineStrict": true,
11
11
  "license": "MIT",
@@ -17,7 +17,6 @@
17
17
  "fs": false,
18
18
  "path": "path-browserify",
19
19
  "os": false,
20
- "node-fetch": false,
21
20
  "colorette": false,
22
21
  "https-proxy-agent": false
23
22
  },
@@ -37,13 +36,11 @@
37
36
  "dependencies": {
38
37
  "@redocly/ajv": "^8.11.2",
39
38
  "@redocly/config": "^0.20.1",
40
- "ajv-formats": "^3.0.1",
41
39
  "colorette": "^1.2.0",
42
- "https-proxy-agent": "^7.0.4",
40
+ "https-proxy-agent": "^7.0.5",
43
41
  "js-levenshtein": "^1.1.6",
44
42
  "js-yaml": "^4.1.0",
45
43
  "minimatch": "^5.0.1",
46
- "node-fetch": "^2.6.1",
47
44
  "pluralize": "^8.0.0",
48
45
  "yaml-ast-parser": "0.0.43"
49
46
  },
@@ -51,8 +48,6 @@
51
48
  "@types/js-levenshtein": "^1.1.0",
52
49
  "@types/js-yaml": "^4.0.3",
53
50
  "@types/minimatch": "^3.0.5",
54
- "@types/node": "^20.11.5",
55
- "@types/node-fetch": "^2.5.7",
56
51
  "@types/pluralize": "^0.0.29",
57
52
  "json-schema-to-ts": "^3.1.0",
58
53
  "typescript": "5.5.3"