@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.
Files changed (40) hide show
  1. package/CHANGELOG.md +12 -4
  2. package/lib/config/all.js +1 -1
  3. package/lib/config/minimal.js +1 -1
  4. package/lib/config/recommended-strict.js +1 -1
  5. package/lib/config/recommended.js +1 -1
  6. package/lib/config/spec.js +1 -1
  7. package/lib/logger.d.ts +4 -1
  8. package/lib/logger.js +3 -2
  9. package/lib/rules/arazzo/index.js +3 -3
  10. package/lib/rules/arazzo/requestBody-replacements-unique.js +21 -16
  11. package/lib/rules/common/operation-tag-defined.js +7 -1
  12. package/lib/rules/{spot → respect}/no-criteria-xpath.js +1 -1
  13. package/lib/rules/respect/respect-supported-versions.d.ts +2 -0
  14. package/lib/rules/{spot/spot-supported-versions.js → respect/respect-supported-versions.js} +6 -6
  15. package/lib/types/redocly-yaml.d.ts +1 -1
  16. package/lib/types/redocly-yaml.js +1 -1
  17. package/lib/typings/arazzo.d.ts +1 -1
  18. package/lib/typings/arazzo.js +2 -2
  19. package/package.json +2 -1
  20. package/src/config/__tests__/__snapshots__/config-resolvers.test.ts.snap +2 -2
  21. package/src/config/all.ts +1 -1
  22. package/src/config/minimal.ts +1 -1
  23. package/src/config/recommended-strict.ts +1 -1
  24. package/src/config/recommended.ts +1 -1
  25. package/src/config/spec.ts +1 -1
  26. package/src/logger.ts +3 -1
  27. package/src/rules/arazzo/__tests__/no-criteria-xpath.test.ts +2 -2
  28. package/src/rules/arazzo/__tests__/{spot-supported-versions.test.ts → respect-supported-versions.test.ts} +5 -5
  29. package/src/rules/arazzo/index.ts +3 -3
  30. package/src/rules/arazzo/requestBody-replacements-unique.ts +20 -15
  31. package/src/rules/common/__tests__/operation-tag-defined.test.ts +68 -0
  32. package/src/rules/common/operation-tag-defined.ts +6 -1
  33. package/src/rules/oas3/__tests__/no-invalid-media-type-examples.test.ts +2 -0
  34. package/src/rules/{spot → respect}/no-criteria-xpath.ts +1 -1
  35. package/src/rules/{spot/spot-supported-versions.ts → respect/respect-supported-versions.ts} +6 -6
  36. package/src/types/redocly-yaml.ts +1 -1
  37. package/src/typings/arazzo.ts +1 -1
  38. package/tsconfig.tsbuildinfo +1 -1
  39. package/lib/rules/spot/spot-supported-versions.d.ts +0 -2
  40. /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 Spot.',
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 { ARAZZO_VERSIONS_SUPPORTED_BY_SPOT } from '../../typings/arazzo';
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 SpotSupportedVersions: Arazzo1Rule = () => {
8
- const supportedVersions = ARAZZO_VERSIONS_SUPPORTED_BY_SPOT.join(', ');
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 (!ARAZZO_VERSIONS_SUPPORTED_BY_SPOT.includes(root.arazzo)) {
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
- ARAZZO_VERSIONS_SUPPORTED_BY_SPOT.length
17
- )} supported by Spot.`,
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
- 'spot-supported-versions',
155
+ 'respect-supported-versions',
156
156
  'requestBody-replacements-unique',
157
157
  'no-criteria-xpath',
158
158
  'criteria-unique',
@@ -169,4 +169,4 @@ export interface ArazzoDefinition {
169
169
 
170
170
  export const VERSION_PATTERN = /^1\.0\.\d+(-.+)?$/;
171
171
 
172
- export const ARAZZO_VERSIONS_SUPPORTED_BY_SPOT = ['1.0.1'];
172
+ export const ARAZZO_VERSIONS_SUPPORTED_BY_RESPECT = ['1.0.1'];