Breaking Change: Refactoring of Schema-Level Constraint Enforcement
Summary:
In the recent changes to [`buf/validate/validate.proto`](https://buf.build/bufbuild/protovalidate/file/v0.3.1: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
* Refactor LT/GT into a oneof by elliotmjackson in https://github.com/bufbuild/protovalidate/pull/76
**Full Changelog**: https://github.com/bufbuild/protovalidate/compare/v0.2.8...v0.3.0