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: properly match AJV paths with slashes #2147

Merged
merged 1 commit into from
Jun 20, 2023

Conversation

sdirix
Copy link
Member

@sdirix sdirix commented Jun 13, 2023

AJV error paths are JSON Pointers. These paths are converted to dot-notation in JSON Forms. However escaped JSON Pointer characters were not decoded. Therefore errors for properties containing one of the escaped characters were not properly matched.

Background information: In JSON Pointers two characters need to be escaped: '~' is converted to '~0' and '/' is converted to '~1'. Therefore properties containing either '~' or '/' were not properly matched to errors before this fix.

Fixes #2146

AJV error paths are JSON Pointers. These paths are converted to dot-notation in JSON
Forms. However escaped JSON Pointer characters were not decoded. Therefore errors for
properties containing one of the escaped characters were not properly matched.

Background information: In JSON Pointers two characters need to be escaped: '~' is
converted to '~0' and '/' is converted to '~1'. Therefore properties containing either
'~' or '/' were not properly matched to errors before this fix.

Fixes eclipsesource#2146
@netlify
Copy link

netlify bot commented Jun 13, 2023

Deploy Preview for jsonforms-examples ready!

Name Link
🔨 Latest commit d7b0803
🔍 Latest deploy log https://app.netlify.com/sites/jsonforms-examples/deploys/64884abb0aee700007786b2f
😎 Deploy Preview https://deploy-preview-2147--jsonforms-examples.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@coveralls
Copy link

Coverage Status

coverage: 84.254%. remained the same when pulling d7b0803 on sdirix:fix-slash-error-matching into a5fdca6 on eclipsesource:master.

Copy link
Contributor

@LukasBoll LukasBoll left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested the changes and they look good to me.

@sdirix sdirix merged commit 84aec0c into eclipsesource:master Jun 20, 2023
@sdirix sdirix deleted the fix-slash-error-matching branch June 20, 2023 10:43
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.

Errors for properties containing slashes are not properly matched
3 participants