Redocly / redocly-cli

⚒️ Redocly CLI makes OpenAPI easy. Lint/validate to any standard, generate beautiful docs, and more.
https://redocly.com/docs/cli/
MIT License
912 stars 139 forks source link

fix: improve error messages #1536

Closed tatomyr closed 5 months ago

tatomyr commented 5 months ago

What/Why/How?

When an assertion is supposed to run only on object keys and the assertion subject contains the property key, the error is - <the assertion name> can't be used on a single property. Please use 'property'.. which should be the other way around (thanks @adamaltman for pointing on that). This PR fixes that, and also cleans up the error messages by removing needless periods and using better formatting.

Reference

Testing

Screenshots (optional)

Check yourself

Security

changeset-bot[bot] commented 5 months ago

⚠️ No Changeset found

Latest commit: ed380df0a0556c6a2eabb7fd9e5893c3d00e8e59

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[bot] commented 5 months ago
Command Mean [ms] Min [ms] Max [ms] Relative
redocly lint packages/core/src/benchmark/benches/rebilly.yaml 995.4 ± 15.8 971.6 1019.0 1.00
redocly-next lint packages/core/src/benchmark/benches/rebilly.yaml 999.3 ± 25.6 979.2 1049.5 1.00 ± 0.03
github-actions[bot] commented 5 months ago

Coverage report

St.:grey_question:
Category Percentage Covered / Total
🟡 Statements 77.05% 4451/5777
🟡 Branches 67.48% 2447/3626
🟡 Functions 70.73% 742/1049
🟡 Lines 77.24% 4185/5418

Test suite run success

734 tests passing in 102 suites.

Report generated by 🧪jest coverage report action from ed380df0a0556c6a2eabb7fd9e5893c3d00e8e59