@redocly/openapi-core 1.28.4 → 1.29.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.
Files changed (48) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/lib/config/all.js +3 -0
  3. package/lib/config/minimal.js +3 -0
  4. package/lib/config/recommended-strict.js +3 -0
  5. package/lib/config/recommended.js +3 -0
  6. package/lib/rules/common/no-schema-type-mismatch.d.ts +2 -0
  7. package/lib/rules/common/no-schema-type-mismatch.js +22 -0
  8. package/lib/rules/oas2/index.js +2 -0
  9. package/lib/rules/oas3/index.js +2 -0
  10. package/lib/rules/oas3/no-invalid-media-type-examples.js +1 -1
  11. package/lib/types/overlay.d.ts +2 -0
  12. package/lib/types/overlay.js +39 -0
  13. package/lib/types/redocly-yaml.d.ts +2 -2
  14. package/lib/types/redocly-yaml.js +3 -1
  15. package/lib/typings/arazzo.d.ts +1 -1
  16. package/lib/typings/arazzo.js +1 -1
  17. package/lib/typings/overlay.d.ts +17 -0
  18. package/lib/typings/overlay.js +4 -0
  19. package/package.json +1 -1
  20. package/src/config/__tests__/__snapshots__/config-resolvers.test.ts.snap +6 -0
  21. package/src/config/all.ts +3 -0
  22. package/src/config/minimal.ts +3 -0
  23. package/src/config/recommended-strict.ts +3 -0
  24. package/src/config/recommended.ts +3 -0
  25. package/src/rules/arazzo/__tests__/criteria-unique.test.ts +1 -1
  26. package/src/rules/arazzo/__tests__/no-criteria-xpath.test.ts +1 -1
  27. package/src/rules/arazzo/__tests__/parameters-unique.test.ts +1 -1
  28. package/src/rules/arazzo/__tests__/requestBody-replacements-unique.test.ts +1 -1
  29. package/src/rules/arazzo/__tests__/source-description-type.test.ts +1 -1
  30. package/src/rules/arazzo/__tests__/sourceDescription-name-unique.test.ts +1 -1
  31. package/src/rules/arazzo/__tests__/sourceDescriptions-not-empty.test.ts +2 -2
  32. package/src/rules/arazzo/__tests__/spot-supported-versions.test.ts +1 -1
  33. package/src/rules/arazzo/__tests__/step-onFailure-unique.test.ts +1 -1
  34. package/src/rules/arazzo/__tests__/step-onSuccess-unique.test.ts +1 -1
  35. package/src/rules/arazzo/__tests__/stepId-unique.test.ts +1 -1
  36. package/src/rules/arazzo/__tests__/workflow-dependsOn.test.ts +2 -2
  37. package/src/rules/arazzo/__tests__/workflowId-unique.test.ts +1 -1
  38. package/src/rules/common/__tests__/no-schema-type-mismatch.test.ts +126 -0
  39. package/src/rules/common/no-schema-type-mismatch.ts +24 -0
  40. package/src/rules/oas2/index.ts +2 -0
  41. package/src/rules/oas3/__tests__/no-invalid-media-type-examples.test.ts +50 -0
  42. package/src/rules/oas3/index.ts +2 -0
  43. package/src/rules/oas3/no-invalid-media-type-examples.ts +1 -1
  44. package/src/types/overlay.ts +40 -0
  45. package/src/types/redocly-yaml.ts +4 -2
  46. package/src/typings/arazzo.ts +2 -2
  47. package/src/typings/overlay.ts +19 -0
  48. package/tsconfig.tsbuildinfo +1 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # @redocly/openapi-core
2
2
 
3
+ ## 1.29.0
4
+
5
+ ### Minor Changes
6
+
7
+ - Added the `no-schema-type-mismatch` rule.
8
+ - Added typings and interfaces for Overlay Specification v1.0.0.
9
+
10
+ ### Patch Changes
11
+
12
+ - Added validation to ensure only Arazzo version 1.0.1 is used, helping users stay on the supported version.
13
+ - Fixed an issue where the `no-invalid-media-type-examples` rule crashed instead of reporting an error when it failed to resolve an example from a $ref.
14
+
15
+ ## 1.28.5
16
+
3
17
  ## 1.28.4
4
18
 
5
19
  ## 1.28.3
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',
@@ -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;
@@ -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 = {};
@@ -27,7 +27,7 @@ const ValidContentExamples = (opts) => {
27
27
  location = isMultiple ? resolved.location.child('value') : resolved.location;
28
28
  example = resolved.node;
29
29
  }
30
- if (isMultiple && typeof example.value === 'undefined') {
30
+ if (isMultiple && typeof example?.value === 'undefined') {
31
31
  return;
32
32
  }
33
33
  (0, utils_1.validateExample)(isMultiple ? example.value : example, mediaType.schema, location, ctx, allowAdditionalProperties);
@@ -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',
@@ -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', '1.0.1'];
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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@redocly/openapi-core",
3
- "version": "1.28.4",
3
+ "version": "1.29.0",
4
4
  "description": "",
5
5
  "main": "lib/index.js",
6
6
  "engines": {
@@ -59,6 +59,7 @@ exports[`resolveConfig should ignore minimal from the root and read local file 1
59
59
  "no-invalid-schema-examples": "off",
60
60
  "no-path-trailing-slash": "error",
61
61
  "no-required-schema-properties-undefined": "off",
62
+ "no-schema-type-mismatch": "warn",
62
63
  "no-unresolved-refs": "error",
63
64
  "operation-2xx-response": "warn",
64
65
  "operation-4xx-response": "error",
@@ -114,6 +115,7 @@ exports[`resolveConfig should ignore minimal from the root and read local file 1
114
115
  "no-invalid-schema-examples": "off",
115
116
  "no-path-trailing-slash": "error",
116
117
  "no-required-schema-properties-undefined": "off",
118
+ "no-schema-type-mismatch": "warn",
117
119
  "no-server-example.com": "warn",
118
120
  "no-server-trailing-slash": "error",
119
121
  "no-server-variables-empty-enum": "error",
@@ -173,6 +175,7 @@ exports[`resolveConfig should ignore minimal from the root and read local file 1
173
175
  "no-invalid-schema-examples": "off",
174
176
  "no-path-trailing-slash": "error",
175
177
  "no-required-schema-properties-undefined": "off",
178
+ "no-schema-type-mismatch": "warn",
176
179
  "no-server-example.com": "warn",
177
180
  "no-server-trailing-slash": "error",
178
181
  "no-server-variables-empty-enum": "error",
@@ -285,6 +288,7 @@ exports[`resolveStyleguideConfig should resolve extends with local file config w
285
288
  "no-invalid-schema-examples": "off",
286
289
  "no-path-trailing-slash": "error",
287
290
  "no-required-schema-properties-undefined": "off",
291
+ "no-schema-type-mismatch": "warn",
288
292
  "no-unresolved-refs": "error",
289
293
  "operation-2xx-response": "error",
290
294
  "operation-4xx-response": "off",
@@ -340,6 +344,7 @@ exports[`resolveStyleguideConfig should resolve extends with local file config w
340
344
  "no-invalid-schema-examples": "off",
341
345
  "no-path-trailing-slash": "error",
342
346
  "no-required-schema-properties-undefined": "off",
347
+ "no-schema-type-mismatch": "warn",
343
348
  "no-server-example.com": "warn",
344
349
  "no-server-trailing-slash": "error",
345
350
  "no-server-variables-empty-enum": "error",
@@ -399,6 +404,7 @@ exports[`resolveStyleguideConfig should resolve extends with local file config w
399
404
  "no-invalid-schema-examples": "off",
400
405
  "no-path-trailing-slash": "error",
401
406
  "no-required-schema-properties-undefined": "off",
407
+ "no-schema-type-mismatch": "warn",
402
408
  "no-server-example.com": "warn",
403
409
  "no-server-trailing-slash": "error",
404
410
  "no-server-variables-empty-enum": "error",
package/src/config/all.ts CHANGED
@@ -19,6 +19,7 @@ const all: PluginStyleguideConfig<'built-in'> = {
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: PluginStyleguideConfig<'built-in'> = {
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: PluginStyleguideConfig<'built-in'> = {
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: PluginStyleguideConfig<'built-in'> = {
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: PluginStyleguideConfig<'built-in'> = {
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: PluginStyleguideConfig<'built-in'> = {
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: PluginStyleguideConfig<'built-in'> = {
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: PluginStyleguideConfig<'built-in'> = {
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: PluginStyleguideConfig<'built-in'> = {
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: PluginStyleguideConfig<'built-in'> = {
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: PluginStyleguideConfig<'built-in'> = {
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: PluginStyleguideConfig<'built-in'> = {
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',
@@ -6,7 +6,7 @@ import { BaseResolver } from '../../../resolve';
6
6
  describe('Arazzo criteria-unique', () => {
7
7
  const document = parseYamlToDocument(
8
8
  outdent`
9
- arazzo: '1.0.0'
9
+ arazzo: '1.0.1'
10
10
  info:
11
11
  title: Cool API
12
12
  version: 1.0.0
@@ -6,7 +6,7 @@ import { BaseResolver } from '../../../resolve';
6
6
  describe('Arazzo no-criteria-xpath', () => {
7
7
  const document = parseYamlToDocument(
8
8
  outdent`
9
- arazzo: '1.0.0'
9
+ arazzo: '1.0.1'
10
10
  info:
11
11
  title: Cool API
12
12
  version: 1.0.0
@@ -6,7 +6,7 @@ import { BaseResolver } from '../../../resolve';
6
6
  describe('Arazzo parameters-unique', () => {
7
7
  const document = parseYamlToDocument(
8
8
  outdent`
9
- arazzo: '1.0.0'
9
+ arazzo: '1.0.1'
10
10
  info:
11
11
  title: Cool API
12
12
  version: 1.0.0
@@ -6,7 +6,7 @@ import { BaseResolver } from '../../../resolve';
6
6
  describe('Arazzo requestBody-replacements-unique', () => {
7
7
  const document = parseYamlToDocument(
8
8
  outdent`
9
- arazzo: '1.0.0'
9
+ arazzo: '1.0.1'
10
10
  info:
11
11
  title: Cool API
12
12
  version: 1.0.0
@@ -6,7 +6,7 @@ import { BaseResolver } from '../../../resolve';
6
6
  describe('Arazzo sourceDescription-type', () => {
7
7
  const document = parseYamlToDocument(
8
8
  outdent`
9
- arazzo: '1.0.0'
9
+ arazzo: '1.0.1'
10
10
  info:
11
11
  title: Cool API
12
12
  version: 1.0.0
@@ -6,7 +6,7 @@ import { BaseResolver } from '../../../resolve';
6
6
  describe('Arazzo sourceDescription-name-unique', () => {
7
7
  const document = parseYamlToDocument(
8
8
  outdent`
9
- arazzo: '1.0.0'
9
+ arazzo: '1.0.1'
10
10
  info:
11
11
  title: Cool API
12
12
  version: 1.0.0
@@ -6,7 +6,7 @@ import { BaseResolver } from '../../../resolve';
6
6
  describe('Arazzo sourceDescriptions-not-empty', () => {
7
7
  const document1 = parseYamlToDocument(
8
8
  outdent`
9
- arazzo: '1.0.0'
9
+ arazzo: '1.0.1'
10
10
  info:
11
11
  title: Cool API
12
12
  version: 1.0.0
@@ -38,7 +38,7 @@ describe('Arazzo sourceDescriptions-not-empty', () => {
38
38
 
39
39
  const document2 = parseYamlToDocument(
40
40
  outdent`
41
- arazzo: '1.0.0'
41
+ arazzo: '1.0.1'
42
42
  info:
43
43
  title: Cool API
44
44
  version: 1.0.0
@@ -81,7 +81,7 @@ describe('Arazzo spot-supported-versions', () => {
81
81
  "source": "arazzo.yaml",
82
82
  },
83
83
  ],
84
- "message": "Only 1.0.0, 1.0.1 Arazzo versions are supported by Spot.",
84
+ "message": "Only 1.0.1 Arazzo version is supported by Spot.",
85
85
  "ruleId": "spot-supported-versions",
86
86
  "severity": "error",
87
87
  "suggest": [],
@@ -6,7 +6,7 @@ import { BaseResolver } from '../../../resolve';
6
6
  describe('Arazzo step-onFailure-unique', () => {
7
7
  const document = parseYamlToDocument(
8
8
  outdent`
9
- arazzo: '1.0.0'
9
+ arazzo: '1.0.1'
10
10
  info:
11
11
  title: Cool API
12
12
  version: 1.0.0
@@ -6,7 +6,7 @@ import { BaseResolver } from '../../../resolve';
6
6
  describe('Arazzo step-onSuccess-unique', () => {
7
7
  const document = parseYamlToDocument(
8
8
  outdent`
9
- arazzo: '1.0.0'
9
+ arazzo: '1.0.1'
10
10
  info:
11
11
  title: Cool API
12
12
  version: 1.0.0
@@ -6,7 +6,7 @@ import { BaseResolver } from '../../../resolve';
6
6
  describe('Arazzo stepId-unique', () => {
7
7
  const document = parseYamlToDocument(
8
8
  outdent`
9
- arazzo: '1.0.0'
9
+ arazzo: '1.0.1'
10
10
  info:
11
11
  title: Cool API
12
12
  version: 1.0.0
@@ -6,7 +6,7 @@ import { BaseResolver } from '../../../resolve';
6
6
  describe('Arazzo workflow-dependsOn', () => {
7
7
  const document = parseYamlToDocument(
8
8
  outdent`
9
- arazzo: '1.0.0'
9
+ arazzo: '1.0.1'
10
10
  info:
11
11
  title: Cool API
12
12
  version: 1.0.0
@@ -65,7 +65,7 @@ describe('Arazzo workflow-dependsOn', () => {
65
65
 
66
66
  const documentWithNotExistingWorkflows = parseYamlToDocument(
67
67
  outdent`
68
- arazzo: 1.0.0
68
+ arazzo: 1.0.1
69
69
  info:
70
70
  title: Redocly Museum API Test Workflow
71
71
  description: >-
@@ -6,7 +6,7 @@ import { BaseResolver } from '../../../resolve';
6
6
  describe('Arazzo workflowId-unique', () => {
7
7
  const document = parseYamlToDocument(
8
8
  outdent`
9
- arazzo: '1.0.0'
9
+ arazzo: '1.0.1'
10
10
  info:
11
11
  title: Cool API
12
12
  version: 1.0.0