fix: clean up the discriminator mapping in the remove-x-internal decorator
What/Why/How?
Fixed the remove-x-internal decorator, which was not removing the reference in the corresponding discriminator mapping while removing the original $ref.
Reference
Fixes https://github.com/Redocly/redocly-cli/issues/1649
Testing
Screenshots (optional)
Check yourself
- [ ] Code changed? - Tested with redoc/reference-docs/workflows (internal)
- [x] All new/updated code is covered with tests
- [ ] New package installed? - Tested in different environments (browser/node)
Security
- [x] Security impact of change has been considered
- [x] Code follows company security practices and guidelines
🦋 Changeset detected
Latest commit: ec94fa8fca33a4a0abf5a21292552f4632ff4a95
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
| Command | Mean [s] | Min [s] | Max [s] | Relative |
|---|---|---|---|---|
redocly lint packages/core/src/benchmark/benches/rebilly.yaml |
1.003 ± 0.021 | 0.980 | 1.037 | 1.00 |
redocly-next lint packages/core/src/benchmark/benches/rebilly.yaml |
1.013 ± 0.015 | 0.989 | 1.046 | 1.01 ± 0.03 |
Coverage report
St.:grey_question: |
Category | Percentage | Covered / Total |
|---|---|---|---|
| 🟡 | Statements | 78.81% | 5011/6358 |
| 🟡 | Branches | 67.52% | 2075/3073 |
| 🟡 | Functions | 73.3% | 829/1131 |
| 🟡 | Lines | 79.12% | 4729/5977 |
Test suite run success
811 tests passing in 121 suites.
Report generated by 🧪jest coverage report action from ec94fa8fca33a4a0abf5a21292552f4632ff4a95