You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor: use discriminated unions for Trigger model to eliminate redundant validation
Changes:
- Refactored Trigger.value from dict to typed TriggerValue union
- Added discriminated union support using Literal type for CronTrigger.type
- Removed redundant CronTrigger.model_validate() call in verify_graph.py
- Updated all tests to include type field in trigger value dicts
Benefits:
- Single validation at request time (no re-validation needed)
- Type safety with IDE autocomplete and static analysis
- Cleaner code: trigger.value.expression vs trigger.value["expression"]
- Extensible: easy to add new trigger types to the union
- All 38 trigger-related tests passing
Also bumped python-sdk version to 0.0.3b2
0 commit comments