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
849 stars 129 forks source link

fix: falsy values in no-invalid-media-type-examples, no-invalid-parameter-examples, and no-invalid-schema-examples rules #1582

Closed tatomyr closed 2 weeks ago

tatomyr commented 3 weeks ago

What/Why/How?

Fixed a small issue in no-invalid-media-type-examples, no-invalid-parameter-examples, and no-invalid-schema-examples rules which allowed to pass falsy examples for any schema.

Reference

Testing

Screenshots (optional)

Check yourself

Security

changeset-bot[bot] commented 3 weeks ago

🦋 Changeset detected

Latest commit: 026dc7b8440c92fe75b66257215ff8f112510e32

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages | Name | Type | | --------------------- | ----- | | @redocly/openapi-core | Patch | | @redocly/cli | Patch |

Not sure what this means? Click here to learn what changesets are.

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

github-actions[bot] commented 3 weeks ago
Command Mean [ms] Min [ms] Max [ms] Relative
redocly lint packages/core/src/benchmark/benches/rebilly.yaml 997.0 ± 39.4 948.7 1087.7 1.01 ± 0.05
redocly-next lint packages/core/src/benchmark/benches/rebilly.yaml 990.1 ± 22.0 963.3 1026.2 1.00
github-actions[bot] commented 3 weeks ago

Coverage report

St.:grey_question:
Category Percentage Covered / Total
🟡 Statements 77.22% 4481/5803
🟡 Branches 67.5% 2474/3665
🟡 Functions 70.72% 744/1052
🟡 Lines 77.41% 4215/5445

Test suite run success

741 tests passing in 104 suites.

Report generated by 🧪jest coverage report action from 026dc7b8440c92fe75b66257215ff8f112510e32