Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: report on child keys when using pattern or notPattern assertions #1299

Merged
merged 2 commits into from
Oct 17, 2023

Conversation

tatomyr
Copy link
Contributor

@tatomyr tatomyr commented Oct 17, 2023

What/Why/How?

When introspecting objects with pattern and notPattern assertions, Redocly CLI highlights the parent key:

paths: # <- highlighted
   correct: ...
   wrong: ...

This changes the report location to children keys:

paths: 
   correct: ...
   wrong: # <- highlighted

Reference

Related to Redocly/redocly-vs-code#52

Testing

Screenshots (optional)

Check yourself

  • Code is linted
  • Tested with redoc/reference-docs/workflows (internal)
  • All new/updated code is covered with tests

Security

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

@changeset-bot
Copy link

changeset-bot bot commented Oct 17, 2023

🦋 Changeset detected

Latest commit: b889343

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

@tatomyr tatomyr self-assigned this Oct 17, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Oct 17, 2023

Command Mean [s] Min [s] Max [s] Relative
redocly lint packages/core/src/benchmark/benches/rebilly.yaml 1.350 ± 0.025 1.311 1.387 1.00 ± 0.03
redocly-next lint packages/core/src/benchmark/benches/rebilly.yaml 1.348 ± 0.026 1.307 1.391 1.00

@github-actions
Copy link
Contributor

github-actions bot commented Oct 17, 2023

Coverage report

St.
Category Percentage Covered / Total
🟡 Statements 75.95% 4010/5280
🟡 Branches 65.91% 2140/3247
🟡 Functions 67.95% 651/958
🟡 Lines 76.13% 3758/4936
Show files with reduced coverage 🔻
St.
File Statements Branches Functions Lines
🟢
... / asserts.ts
80.25% 76.98% 84.62% 87.14%

Test suite run success

641 tests passing in 93 suites.

Report generated by 🧪jest coverage report action from b889343

@tatomyr tatomyr force-pushed the fix/wrong-report-location-on-pattern-assertions branch from 01fd28a to b889343 Compare October 17, 2023 07:37
@tatomyr tatomyr marked this pull request as ready for review October 17, 2023 13:30
@tatomyr tatomyr requested a review from a team as a code owner October 17, 2023 13:30
@tatomyr tatomyr merged commit d703d22 into main Oct 17, 2023
26 checks passed
@tatomyr tatomyr deleted the fix/wrong-report-location-on-pattern-assertions branch October 17, 2023 14:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants