Skip to content

Conversation

@adamskeeled
Copy link
Contributor

In JSON Pointers two characters need to be escaped: '~' is converted to '~0' and '/' is converted to '~1'.
When JSON Paths contain one of these two characters, when trying to check whether those path are required, the isRequired function is used. That function compares the scoped path (which in this case is the encoded path with the converted symbols) with the closest required array (which contains the original unencoded path with either ~ or /).

Before checking the required array, we need to decode the scoped path so the comparison works properly.

Fixes #2366

@CLAassistant
Copy link

CLAassistant commented Aug 14, 2024

CLA assistant check
All committers have signed the CLA.

@netlify
Copy link

netlify bot commented Aug 14, 2024

Deploy Preview for jsonforms-examples ready!

Name Link
🔨 Latest commit 463d9ff
🔍 Latest deploy log https://app.netlify.com/sites/jsonforms-examples/deploys/66bf3aca017fe900084b7c26
😎 Deploy Preview https://deploy-preview-2367--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 configuration.

@sdirix
Copy link
Member

sdirix commented Aug 14, 2024

Thanks for the contribution and the included test case ❤️ That's what we like to see ;)

@adamskeeled adamskeeled requested a review from sdirix August 14, 2024 14:55
Copy link
Member

@sdirix sdirix left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution!

@coveralls
Copy link

Coverage Status

coverage: 83.265%. remained the same
when pulling 463d9ff on adamskeeled:fix/slash-required-matching
into 26fd0e9 on eclipsesource:master.

@sdirix sdirix merged commit 64b569c into eclipsesource:master Aug 16, 2024
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.

isRequired encoded scope paths with slashes not properly matched

4 participants