-
-
Notifications
You must be signed in to change notification settings - Fork 531
Support for making references to schema properties #626
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
Conversation
Codecov Report
@@ Coverage Diff @@
## main #626 +/- ##
==========================================
+ Coverage 93.52% 93.57% +0.04%
==========================================
Files 11 11
Lines 510 529 +19
Branches 183 189 +6
==========================================
+ Hits 477 495 +18
- Misses 32 33 +1
Partials 1 1
Continue to review full report at Codecov.
|
Cool. This looks great, but I wouldn’t want to merge this without adding a test first. Can you write a unit test for this? I think a great place would be in |
Actually, on second thought, now that #602 is merged, we can keep your approach, but we’ll have to move it to load.ts#L152. Something like: let [base, ...rest] = parts;
+ if (rest[rest.length - 2] === 'properties') rest.splice(rest.length - 2, 1); // if "properties" is next-to-last segment, remove
return `${base}["${rest.join('"]["')}"]`; The change was due to the fact that because we resolve remote schemas, we have to resolve |
Sure
All right, I will move it 🙂 |
Just checking in. Are you still able to make this change? Then we can get this merged. Sorry again for the v4 disruption on this! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved pending moving to load.ts
(as this utility no longer exists)
I chose to make the test as a schema-load-test in v2 and v3. That is because the check and change is made at the load phase, and the test in And sorry about the late response, I've been busy 🙂 |
No worries at all! I totally understand—I only work on this project when I have time as well. 🙂 |
Is there anything else blocking merging this PR? I also ran into this issue recently and would like to get this patch available. |
Nope! Sorry—I fell a little behind on maintenance for this project and am just now catching up. Will publish this in the next release! |
@all-contributors please add @Peteck for code, bug |
I've put up a pull request to add @Peteck! 🎉 |
Fixes issue #617