WIP: change path to JSON pointer#2168
Conversation
✅ Deploy Preview for jsonforms-examples ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
9a40570 to
c2adb17
Compare
c2adb17 to
63934f5
Compare
sdirix
left a comment
There was a problem hiding this comment.
Looks good, just some minor comments
| const i18nKeyPrefix = getI18nKeyPrefixBySchema(undefined, uischema); | ||
| const i18nKey = | ||
| typeof i18nKeyPrefix === 'string' | ||
| ? `${i18nKeyPrefix}.label` |
There was a problem hiding this comment.
Here we want to keep the dots, right?
packages/core/src/util/path.ts
Outdated
| let p2 = path2; | ||
| if (!isEmpty(path2) && !path2.startsWith('[') && !path2.startsWith('/')) { | ||
| p2 = '/' + path2; | ||
| } |
There was a problem hiding this comment.
I think we can remove the square brackets handling here. They are not a valid feature of JSON pointers.
packages/core/src/util/path.ts
Outdated
| if (isEmpty(path1)) { | ||
| return p2; | ||
| } else if (isEmpty(path2)) { | ||
| return p1; | ||
| return path1; |
There was a problem hiding this comment.
Will path2 which is handed in never start with a / already? The compose should have a JSDoc clearly declaring in which format it expects the handed over paths. Looking at this code it seems the path2 is rather a path segment.
63934f5 to
caf7383
Compare
sdirix
left a comment
There was a problem hiding this comment.
Please adapt migration document with a description of the breaking changes and how to fix them
8bd14c2 to
e9946ef
Compare
|
Superseded by rebased and extended PR #2346 . |
closes #2153