-
-
Notifications
You must be signed in to change notification settings - Fork 366
fix: kube-core::Schema hoisting logic #1839
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
base: main
Are you sure you want to change the base?
Conversation
Fixes kube Schema conversion since schemars Schema's have changed. - Add tests for a variety of enum use-cases: - Tagged vs Untagged - Unit vs Tuple vs Structural variants - With and without doc-comments (descriptions) - Rewrite the hoisting logic - This is annotated with dev-comments to help understand intend and to ease future schemars changes. This also fixes other issues: - Untagged enum variant doc-comments were being applied to field descriptions. - Additional `null` entry added to enums. --------- Co-authored-by: Nick Larsen <[email protected]> Co-authored-by: Sebastian Bernauer <[email protected]> Co-authored-by: Techassi <[email protected]> Signed-off-by: Nick Larsen <[email protected]>
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #1839 +/- ##
=======================================
+ Coverage 74.6% 75.2% +0.6%
=======================================
Files 84 90 +6
Lines 7910 8083 +173
=======================================
+ Hits 5900 6071 +171
- Misses 2010 2012 +2
🚀 New features to boost your workflow:
|
|
I'm unsure what to do about the CI error: For me, I get [email protected]. Should I pin the dependency? Line 50 in 7c63f56
|
|
Created #1840 to address the |
|
I've just synced this PR branch to include the CI fixes (done in #1840). This PR should now be ready for review. |
Fixes #1821
This updates the kube Schema hoisting since schemars Schema's have changed.
This also fixes other issues that appeared along the way:
nullentry added to enums.See also: stackabletech#1, where this work was originally done.
Motivation
Since kube 1.0.0, schemas became invalid when optional enums contained comments on the variants.
Solution