@redocly/openapi-core 1.29.0 → 1.31.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -4
- package/lib/config/all.js +1 -1
- package/lib/config/minimal.js +1 -1
- package/lib/config/recommended-strict.js +1 -1
- package/lib/config/recommended.js +1 -1
- package/lib/config/spec.js +1 -1
- package/lib/logger.d.ts +4 -1
- package/lib/logger.js +3 -2
- package/lib/rules/arazzo/index.js +3 -3
- package/lib/rules/arazzo/requestBody-replacements-unique.js +21 -16
- package/lib/rules/common/operation-tag-defined.js +7 -1
- package/lib/rules/{spot → respect}/no-criteria-xpath.js +1 -1
- package/lib/rules/respect/respect-supported-versions.d.ts +2 -0
- package/lib/rules/{spot/spot-supported-versions.js → respect/respect-supported-versions.js} +6 -6
- package/lib/types/redocly-yaml.d.ts +1 -1
- package/lib/types/redocly-yaml.js +1 -1
- package/lib/typings/arazzo.d.ts +1 -1
- package/lib/typings/arazzo.js +2 -2
- package/package.json +2 -1
- package/src/config/__tests__/__snapshots__/config-resolvers.test.ts.snap +2 -2
- package/src/config/all.ts +1 -1
- package/src/config/minimal.ts +1 -1
- package/src/config/recommended-strict.ts +1 -1
- package/src/config/recommended.ts +1 -1
- package/src/config/spec.ts +1 -1
- package/src/logger.ts +3 -1
- package/src/rules/arazzo/__tests__/no-criteria-xpath.test.ts +2 -2
- package/src/rules/arazzo/__tests__/{spot-supported-versions.test.ts → respect-supported-versions.test.ts} +5 -5
- package/src/rules/arazzo/index.ts +3 -3
- package/src/rules/arazzo/requestBody-replacements-unique.ts +20 -15
- package/src/rules/common/__tests__/operation-tag-defined.test.ts +68 -0
- package/src/rules/common/operation-tag-defined.ts +6 -1
- package/src/rules/oas3/__tests__/no-invalid-media-type-examples.test.ts +2 -0
- package/src/rules/{spot → respect}/no-criteria-xpath.ts +1 -1
- package/src/rules/{spot/spot-supported-versions.ts → respect/respect-supported-versions.ts} +6 -6
- package/src/types/redocly-yaml.ts +1 -1
- package/src/typings/arazzo.ts +1 -1
- package/tsconfig.tsbuildinfo +1 -1
- package/lib/rules/spot/spot-supported-versions.d.ts +0 -2
- /package/lib/rules/{spot → respect}/no-criteria-xpath.d.ts +0 -0
|
@@ -10,7 +10,7 @@ export const NoCriteriaXpath: Arazzo1Rule = () => {
|
|
|
10
10
|
}
|
|
11
11
|
if (criteria?.type?.type === 'xpath' || criteria?.type === 'xpath') {
|
|
12
12
|
report({
|
|
13
|
-
message: 'The `xpath` type criteria is not supported by
|
|
13
|
+
message: 'The `xpath` type criteria is not supported by Respect.',
|
|
14
14
|
location: location.child(['type']),
|
|
15
15
|
});
|
|
16
16
|
}
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ARAZZO_VERSIONS_SUPPORTED_BY_RESPECT } from '../../typings/arazzo';
|
|
2
2
|
import { pluralize } from '../../utils';
|
|
3
3
|
|
|
4
4
|
import type { Arazzo1Rule } from '../../visitors';
|
|
5
5
|
import type { UserContext } from '../../walk';
|
|
6
6
|
|
|
7
|
-
export const
|
|
8
|
-
const supportedVersions =
|
|
7
|
+
export const RespectSupportedVersions: Arazzo1Rule = () => {
|
|
8
|
+
const supportedVersions = ARAZZO_VERSIONS_SUPPORTED_BY_RESPECT.join(', ');
|
|
9
9
|
return {
|
|
10
10
|
Root: {
|
|
11
11
|
enter(root, { report, location }: UserContext) {
|
|
12
|
-
if (!
|
|
12
|
+
if (!ARAZZO_VERSIONS_SUPPORTED_BY_RESPECT.includes(root.arazzo)) {
|
|
13
13
|
report({
|
|
14
14
|
message: `Only ${supportedVersions} Arazzo ${pluralize(
|
|
15
15
|
'version is',
|
|
16
|
-
|
|
17
|
-
)} supported by
|
|
16
|
+
ARAZZO_VERSIONS_SUPPORTED_BY_RESPECT.length
|
|
17
|
+
)} supported by Respect.`,
|
|
18
18
|
location: location.child('arazzo'),
|
|
19
19
|
});
|
|
20
20
|
}
|
|
@@ -152,7 +152,7 @@ const builtInArazzo1Rules = [
|
|
|
152
152
|
'parameters-unique',
|
|
153
153
|
'step-onSuccess-unique',
|
|
154
154
|
'step-onFailure-unique',
|
|
155
|
-
'
|
|
155
|
+
'respect-supported-versions',
|
|
156
156
|
'requestBody-replacements-unique',
|
|
157
157
|
'no-criteria-xpath',
|
|
158
158
|
'criteria-unique',
|
package/src/typings/arazzo.ts
CHANGED