Releases: bufbuild/protovalidate-python
v0.2.0
Breaking Change: Refactoring of Schema-Level Constraint Enforcement
Summary:
In the recent changes to buf/validate/validate.proto, we've refactored message definitions, targeting the organization and enforcement of rules within number-centric messages like FloatRules, DoubleRules, Int32Rules, and others.
Specific Changes:
Fields such as gt, gte, lt, and lte have been structured within a oneof to ensure exclusivity:
- Fields associated with lt and lte now reside within the less_than oneof.
- Fields linked to gt and gte have transitioned to the greater_than oneof.
Additionally, timestamp and duration fields related to lt_now and gt_now have been assimilated into their respective less_than and greater_than oneof categories.
Action Required:
To ensure seamless compatibility and functionality, users must update their protobuf dependencies and package concurrently with this release. If your protos were designed with mutually exclusive rules initially, the impact of this change should be minimal.
Rationale:
The restructure aims to make the rule application process more intuitive, thereby eliminating ambiguities and overlaps present in the earlier configuration. This approach ensures that rules are naturally exclusive, reinforcing better design practices.
What's Changed
- Add support for for_key and update protovalidate dep by @Alfus in #63
- Add support for isNan and isInf by @Alfus in #64
Full Changelog: v0.1.0...v0.2.0
v0.1.0
We are excited to introduce protovalidate-python v0.1.0, the Python implementation of protovalidate, providing runtime validation for Protobuf messages based on user-defined constraints, powered by Google's Common Expression Language (CEL).
Key Features
- Protobuf Validation: Validate Protobuf messages at runtime with user-defined rules.
- CEL Support: Define comprehensive validation rules using Google's CEL.
- Efficiency: Designed for performance and minimal system resource usage.
- Flexibility: Create custom validation rules to suit specific needs.
Refer to our official documentation for detailed instructions. For any issues or suggestions, please open an issue on our GitHub page. Stay tuned for future updates.
Full Changelog: https://github.com/bufbuild/protovalidate-python/commits/v0.1.0