Skip to content

Conversation

Danil-Grigorev
Copy link
Member

Motivation

Schemars uses schemars and validate interchangeably, which adds a requirement to accommodate existing users opted-in for validate attribute usage.

Solution

Whitelist validate attribute, as it is a part of schemars derive handling.

Fixes #1745

Copy link

codecov bot commented Apr 21, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 76.2%. Comparing base (8c29549) to head (dd092e4).
Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##            main   #1749     +/-   ##
=======================================
+ Coverage   76.2%   76.2%   +0.1%     
=======================================
  Files         84      84             
  Lines       7855    7856      +1     
=======================================
+ Hits        5980    5981      +1     
  Misses      1875    1875             
Files with missing lines Coverage Δ
kube-derive/src/cel_schema.rs 93.0% <100.0%> (ø)
kube-derive/src/lib.rs 0.0% <ø> (ø)
kube-derive/tests/crd_schema_test.rs 97.0% <100.0%> (+0.1%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@clux clux added the changelog-fix changelog fix category for prs label Apr 21, 2025
@clux clux added this to the 0.100.0 milestone Apr 21, 2025
Copy link
Member

@clux clux left a comment

Choose a reason for hiding this comment

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

Very nice! Guess this makes my comments about potentially renaming CELSchema unnecessary 😄

Signed-off-by: Danil-Grigorev <danil.grigorev@suse.com>
@Danil-Grigorev Danil-Grigorev force-pushed the allow-validate-cel-schema branch from a0399f2 to dd092e4 Compare April 21, 2025 19:45
@clux clux merged commit 1635f20 into kube-rs:main Apr 21, 2025
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog-fix changelog fix category for prs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot use #[validate(...)] in conjunction with #[derive(CELSchema)]
2 participants