redocly-cli icon indicating copy to clipboard operation
redocly-cli copied to clipboard

fix: added encoding on absolutePointer before decodeURIComponent

Open DmitryAnansky opened this issue 1 month ago • 5 comments

What/Why/How?

Fixed an issue where JSON Pointers containing special characters (like %) were not properly URI-encoded when used as URI identifiers, causing validation errors with properties containing percent signs or other special characters.

Reference

Testing

Tested with Redoc/Realm/Reunite => https://github.com/Redocly/redocly/pull/19833

Screenshots (optional)

Check yourself

  • [ ] Code changed? - Tested with Redoc/Realm/Reunite (internal)
  • [x] All new/updated code is covered by tests
  • [ ] New package installed? - Tested in different environments (browser/node)
  • [ ] Documentation update considered

Security

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

DmitryAnansky avatar Dec 12 '25 10:12 DmitryAnansky

🦋 Changeset detected

Latest commit: ba942f543bc4b808fa8a145954ab59c8f37dcf5f

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

This PR includes changesets to release 3 packages
Name Type
@redocly/openapi-core Patch
@redocly/cli Patch
@redocly/respect-core 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

changeset-bot[bot] avatar Dec 12 '25 10:12 changeset-bot[bot]

CLI Version Mean Time ± Std Dev (s) Relative Performance (Lower is Faster)
cli-latest 3.582s ± 0.083s ▓ 1.00x (Fastest)
cli-next 3.834s ± 0.043s ▓▓▓ 1.07x

github-actions[bot] avatar Dec 12 '25 10:12 github-actions[bot]

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 78.58% (🎯 78%) 6188 / 7874
🔵 Statements 78.01% (🎯 78%) 6393 / 8195
🔵 Functions 81.95% (🎯 81%) 1263 / 1541
🔵 Branches 70.4% (🎯 70%) 4241 / 6024
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
packages/core/src/ref-utils.ts 88.23% 96.77% 94.11% 90.32% 9, 47, 74-75
packages/core/src/resolve.ts 96.38% 95.83% 100% 96.22% 84, 276, 425-426, 438-439
packages/core/src/format/codeframes.ts 94.78% 91.13% 100% 96.84% 132, 168, 195, 204, 206, 210
packages/core/src/rules/ajv.ts 88.57% 84.61% 85.71% 96.87% 30, 64, 83
Generated in workflow #8228 for commit ba942f5 by the Vitest Coverage Report Action

github-actions[bot] avatar Dec 12 '25 10:12 github-actions[bot]

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

Install with NPM:

npm install @redocly/[email protected]
# or
npm install @redocly/[email protected]
# or
npm install @redocly/[email protected]

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

github-actions[bot] avatar Dec 12 '25 12:12 github-actions[bot]

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

Install with NPM:

npm install @redocly/[email protected]
# or
npm install @redocly/[email protected]
# or
npm install @redocly/[email protected]

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

github-actions[bot] avatar Dec 12 '25 17:12 github-actions[bot]

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

Install with NPM:

npm install @redocly/[email protected]
# or
npm install @redocly/[email protected]
# or
npm install @redocly/[email protected]

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

github-actions[bot] avatar Dec 16 '25 12:12 github-actions[bot]

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

Install with NPM:

npm install @redocly/[email protected]
# or
npm install @redocly/[email protected]
# or
npm install @redocly/[email protected]

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

github-actions[bot] avatar Dec 16 '25 17:12 github-actions[bot]

CLI Version Mean Time ± Std Dev (s) Relative Performance (Lower is Faster)
cli-latest 3.527s ± 0.030s ▓ 1.00x (Fastest)
cli-next 3.577s ± 0.034s ▓ 1.01x

github-actions[bot] avatar Dec 19 '25 10:12 github-actions[bot]