Skip to content

chore: add reference links for common build-in rules#2839

Open
DmitryAnansky wants to merge 9 commits into
mainfrom
chore/add-reference-links-for-common-rules
Open

chore: add reference links for common build-in rules#2839
DmitryAnansky wants to merge 9 commits into
mainfrom
chore/add-reference-links-for-common-rules

Conversation

@DmitryAnansky
Copy link
Copy Markdown
Contributor

@DmitryAnansky DmitryAnansky commented May 25, 2026

What/Why/How?

  • Added reference links for common build-in rules.
  • Fixed renamed rule filename.

Reference

#2734

Testing

Screenshots (optional)

Check yourself

  • This PR follows the contributing guide
  • All new/updated code is covered by tests
  • Core code changed? - Tested with other Redocly products (internal contributions only)
  • New package installed? - Tested in different environments (browser/node)
  • Documentation update has been considered

Security

  • The security impact of the change has been considered
  • Code follows company security practices and guidelines

Note

Low Risk
Mostly additive metadata on lint output and doc/test updates; behavior of rule logic is unchanged aside from optional reference URLs on reports.

Overview
Lint findings from built-in rules now include a reference URL pointing to the matching Redocly docs page (OAS, Async, Arazzo, and Respect rules). Shared helpers such as validateExample, validateMimeType, validateDefinedAndNonEmpty, and validateResponseCodes were updated to take options objects so callers can pass that link through consistently.

Documentation fixes correct typos in slugs and rule names: request-mime-type (was “mine”) and x-security-scheme-required-values (was “schema”), with config examples and source links aligned. Test snapshots were updated to expect the new reference field on reported problems.

Reviewed by Cursor Bugbot for commit 3ba393b. Bugbot is set up for automated code reviews on this repo. Configure here.

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 25, 2026

⚠️ No Changeset found

Latest commit: 3ba393b

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 25, 2026

CLI Version Mean Time ± Std Dev (s) Relative Performance (Lower is Faster)
cli-latest 2.049s ± 0.023s ▓ 1.00x (Fastest)
cli-next 2.066s ± 0.036s ▓ 1.01x

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 25, 2026

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 81.06% (🎯 80%) 7303 / 9009
🔵 Statements 80.41% (🎯 80%) 7587 / 9435
🔵 Functions 84.08% (🎯 83%) 1463 / 1740
🔵 Branches 72.55% (🎯 72%) 4939 / 6807
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
packages/core/src/rules/utils.ts 91.78% 87.93% 100% 91.04% 65, 99, 109-113, 129, 140-144, 233
packages/core/src/rules/arazzo/criteria-unique.ts 93.1% 83.33% 100% 93.1% 10, 31
packages/core/src/rules/arazzo/requestBody-replacements-unique.ts 100% 100% 100% 100%
packages/core/src/rules/arazzo/sourceDescription-type.ts 85.71% 75% 100% 100% 8
packages/core/src/rules/arazzo/sourceDescriptions-name-unique.ts 88.88% 75% 100% 100% 10
packages/core/src/rules/arazzo/step-onFailure-unique.ts 90.9% 87.5% 100% 100% 8
packages/core/src/rules/arazzo/step-onSuccess-unique.ts 90.9% 87.5% 100% 100% 8
packages/core/src/rules/arazzo/stepId-unique.ts 81.81% 66.66% 100% 100% 8, 12
packages/core/src/rules/arazzo/workflow-dependsOn.ts 100% 91.66% 100% 100%
packages/core/src/rules/arazzo/workflowId-unique.ts 87.5% 75% 100% 100% 10
packages/core/src/rules/async2/channels-kebab-case.ts 100% 75% 100% 100%
packages/core/src/rules/async2/no-channel-trailing-slash.ts 100% 100% 100% 100%
packages/core/src/rules/async3/channels-kebab-case.ts 100% 66.66% 100% 100%
packages/core/src/rules/async3/no-channel-trailing-slash.ts 100% 100% 100% 100%
packages/core/src/rules/common/info-contact.ts 100% 100% 100% 100%
packages/core/src/rules/common/info-license-strict.ts 100% 100% 100% 100%
packages/core/src/rules/common/info-license.ts 100% 100% 100% 100%
packages/core/src/rules/common/no-ambiguous-paths.ts 100% 100% 100% 100%
packages/core/src/rules/common/no-enum-type-mismatch.ts 95.23% 94.44% 100% 100% 15
packages/core/src/rules/common/no-http-verbs-in-paths.ts 94.44% 83.33% 100% 100% 14
packages/core/src/rules/common/no-identical-paths.ts 100% 100% 100% 100%
packages/core/src/rules/common/no-invalid-parameter-examples.ts 100% 100% 100% 100%
packages/core/src/rules/common/no-invalid-schema-examples.ts 100% 100% 100% 100%
packages/core/src/rules/common/no-mixed-number-range-constraints.ts 100% 100% 100% 100%
packages/core/src/rules/common/no-path-trailing-slash.ts 100% 100% 100% 100%
packages/core/src/rules/common/no-required-schema-properties-undefined.ts 97.29% 96.96% 100% 96.87% 59
packages/core/src/rules/common/no-schema-type-mismatch.ts 100% 100% 100% 100%
packages/core/src/rules/common/no-unresolved-refs.ts 66.66% 75% 75% 69.23% 31-35
packages/core/src/rules/common/operation-2xx-response.ts 100% 83.33% 100% 100%
packages/core/src/rules/common/operation-4xx-response.ts 100% 66.66% 100% 100%
packages/core/src/rules/common/operation-description.ts 66.66% 100% 50% 66.66% 10-15
packages/core/src/rules/common/operation-operationId-unique.ts 100% 100% 100% 100%
packages/core/src/rules/common/operation-operationId-url-safe.ts 100% 100% 100% 100%
packages/core/src/rules/common/operation-operationId.ts 100% 100% 100% 100%
packages/core/src/rules/common/operation-parameters-unique.ts 100% 100% 100% 100%
packages/core/src/rules/common/operation-singular-tag.ts 100% 100% 100% 100%
packages/core/src/rules/common/operation-summary.ts 66.66% 100% 50% 66.66% 10-15
packages/core/src/rules/common/operation-tag-defined.ts 90% 83.33% 100% 87.5% 24-28
packages/core/src/rules/common/parameter-description.ts 33.33% 0% 50% 33.33% 9-20
packages/core/src/rules/common/path-declaration-must-exist.ts 75% 50% 100% 75% 8-12
packages/core/src/rules/common/path-http-verbs-order.ts 92.85% 85.71% 100% 91.66% 11
packages/core/src/rules/common/path-not-include-query.ts 100% 100% 100% 100%
packages/core/src/rules/common/path-params-defined.ts 96.55% 93.75% 92.3% 98.21% 119, 132
packages/core/src/rules/common/path-segment-plural.ts 21.42% 0% 50% 23.07% 12-27
packages/core/src/rules/common/paths-kebab-case.ts 100% 100% 100% 100%
packages/core/src/rules/common/required-string-property-missing-min-length.ts 18.18% 0% 25% 18.18% 13-38
packages/core/src/rules/common/response-contains-header.ts 100% 100% 100% 100%
packages/core/src/rules/common/scalar-property-missing-example.ts 78.94% 86.95% 75% 83.33% 41, 47, 55
packages/core/src/rules/common/security-defined.ts 96.42% 93.33% 100% 96.29% 73
packages/core/src/rules/common/spec-strict-refs.ts 100% 100% 100% 100%
packages/core/src/rules/common/tag-description.ts 100% 100% 100% 100%
packages/core/src/rules/common/tags-alphabetical.ts 100% 100% 100% 100%
packages/core/src/rules/oas2/boolean-parameter-prefixes.ts 100% 75% 100% 100%
packages/core/src/rules/oas2/request-mime-type.ts 25% 100% 0% 25% 6-24
packages/core/src/rules/oas2/response-contains-property.ts 90.9% 80% 100% 100% 18
packages/core/src/rules/oas2/response-mime-type.ts 25% 100% 0% 25% 6-24
packages/core/src/rules/oas3/array-parameter-serialization.ts 100% 93.75% 100% 100%
packages/core/src/rules/oas3/boolean-parameter-prefixes.ts 100% 100% 100% 100%
packages/core/src/rules/oas3/component-name-unique.ts 96.96% 72.97% 100% 98.46% 55, 79
packages/core/src/rules/oas3/no-empty-servers.ts 85.71% 83.33% 100% 85.71% 16-20
packages/core/src/rules/oas3/no-example-value-and-externalValue.ts 100% 100% 100% 100%
packages/core/src/rules/oas3/no-invalid-media-type-examples.ts 95.23% 87.5% 100% 100% 38
packages/core/src/rules/oas3/no-server-example.com.ts 100% 100% 100% 100%
packages/core/src/rules/oas3/no-server-trailing-slash.ts 83.33% 83.33% 100% 100% 6
packages/core/src/rules/oas3/no-server-variables-empty-enum.ts 89.18% 90.62% 100% 90% 20-22
packages/core/src/rules/oas3/no-undefined-server-variable.ts 100% 100% 100% 100%
packages/core/src/rules/oas3/nullable-type-sibling.ts 100% 100% 100% 100%
packages/core/src/rules/oas3/operation-4xx-problem-details-rfc7807.ts 100% 100% 100% 100%
packages/core/src/rules/oas3/request-mime-type.ts 40% 100% 20% 40% 10-43
packages/core/src/rules/oas3/response-contains-property.ts 100% 100% 100% 100%
packages/core/src/rules/oas3/response-mime-type.ts 40% 100% 20% 40% 10-43
packages/core/src/rules/oas3/spec-components-invalid-map-name.ts 64.28% 100% 54.54% 64.28% 46-66
packages/core/src/rules/oas3/spec-discriminator-defaultMapping.ts 96% 95.45% 85.71% 95.83% 45
packages/core/src/rules/oas3/spec-example-values.ts 100% 100% 100% 100%
packages/core/src/rules/oas3/spec-no-invalid-encoding-combinations.ts 100% 100% 100% 100%
packages/core/src/rules/oas3/spec-no-invalid-tag-parents.ts 100% 87.5% 100% 100%
packages/core/src/rules/oas3/spec-querystring-parameters.ts 100% 83.33% 100% 100%
packages/core/src/rules/openrpc/no-unused-components.ts 63.15% 75% 50% 66.66% 29, 57-82
packages/core/src/rules/openrpc/spec-no-duplicated-method-params.ts 81.25% 70% 100% 100% 7, 13, 17
packages/core/src/rules/openrpc/spec-no-required-params-after-optional.ts 83.33% 66.66% 100% 100% 7, 13, 17
packages/core/src/rules/respect/no-criteria-xpath.ts 100% 100% 100% 100%
packages/core/src/rules/respect/no-x-security-both-scheme-and-scheme-name.ts 100% 100% 100% 100%
packages/core/src/rules/respect/no-x-security-scheme-name-without-openapi.ts 90.9% 83.33% 100% 90.9% 17
packages/core/src/rules/respect/respect-supported-versions.ts 100% 100% 100% 100%
packages/core/src/rules/respect/x-security-scheme-name-reference.ts 100% 83.33% 100% 100%
packages/core/src/rules/respect/x-security-scheme-required-values.ts 85.71% 78.57% 100% 85.71% 23, 37-40
packages/core/src/utils/validate-mime-type.ts 88.88% 75% 100% 100% 16, 40
Generated in workflow #9995 for commit 3ba393b by the Vitest Coverage Report Action

Comment thread packages/core/src/rules/utils.ts Outdated
Comment thread packages/core/src/rules/common/info-contact.ts
@DmitryAnansky DmitryAnansky force-pushed the chore/add-reference-links-for-common-rules branch from 5f050b8 to 3c75048 Compare May 27, 2026 14:36
@DmitryAnansky DmitryAnansky requested a review from tatomyr May 28, 2026 14:06
@DmitryAnansky DmitryAnansky added the snapshot Create experimental release PR label May 28, 2026
@github-actions
Copy link
Copy Markdown
Contributor

📦 A new experimental 🧪 version v0.0.0-snapshot.1779977489 of Redocly CLI has been published for testing.

Install with NPM:

npm install @redocly/cli@0.0.0-snapshot.1779977489
# or
npm install @redocly/openapi-core@0.0.0-snapshot.1779977489
# or
npm install @redocly/respect-core@0.0.0-snapshot.1779977489

⚠️ Note: This is a development build and may contain unstable features.

@DmitryAnansky DmitryAnansky marked this pull request as ready for review May 28, 2026 14:44
@DmitryAnansky DmitryAnansky requested review from a team as code owners May 28, 2026 14:44
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 4928a50. Configure here.

Comment thread packages/core/src/rules/oas2/request-mime-type.ts Outdated
@tatomyr tatomyr changed the title chore: add reference links for common build-in rules feat: add reference links for common build-in rules May 28, 2026
@tatomyr tatomyr changed the title feat: add reference links for common build-in rules chore: add reference links for common build-in rules May 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no changeset needed snapshot Create experimental release PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants