QuantumGhost
2c1ab4879f
refactor(api): Separate SegmentType for Integer/Float to Enable Pydantic Serialization ( #22025 )
...
refactor(api): Separate SegmentType for Integer/Float to Enable Pydantic Serialization (#22025 )
This PR addresses serialization issues in the VariablePool model by separating the `value_type` tags for `IntegerSegment`/`FloatSegment` and `IntegerVariable`/`FloatVariable`. Previously, both Integer and Float types shared the same `SegmentType.NUMBER` tag, causing conflicts during serialization.
Key changes:
- Introduce distinct `value_type` tags for Integer and Float segments/variables
- Add `VariableUnion` and `SegmentUnion` types for proper type discrimination
- Leverage Pydantic's discriminated union feature for seamless serialization/deserialization
- Enable accurate serialization of data structures containing these types
Closes #22024 .
2025-07-16 12:31:37 +08:00
..
2025-04-29 18:04:33 +08:00
2025-04-14 16:06:10 +08:00
2025-03-21 17:41:03 +08:00
2025-07-10 14:14:02 +08:00
2025-06-24 11:13:28 +08:00
2025-04-29 18:04:33 +08:00
2025-04-14 11:27:14 +08:00
2025-03-21 17:41:03 +08:00
2025-03-21 17:41:03 +08:00
2025-04-29 18:04:33 +08:00
2025-03-21 17:41:03 +08:00
2025-07-01 10:57:07 +08:00
2025-07-16 12:31:37 +08:00
2025-04-18 15:54:22 +08:00
2025-03-21 17:41:03 +08:00
2025-03-21 17:41:03 +08:00
2025-03-21 17:41:03 +08:00
2025-04-29 18:04:33 +08:00
2025-03-21 17:41:03 +08:00
2025-03-21 17:41:03 +08:00
2025-03-21 17:41:03 +08:00
2025-04-01 13:58:10 +08:00
2025-03-21 17:41:03 +08:00
2025-04-03 18:19:11 +08:00
2025-04-22 09:59:14 +08:00
2025-04-22 09:59:14 +08:00
2025-03-21 17:41:03 +08:00
2025-07-11 17:52:16 +08:00
2025-07-11 15:07:32 +08:00
2025-06-24 09:10:30 +08:00
2025-04-18 15:54:22 +08:00
2025-04-06 17:56:08 +08:00
2025-03-21 17:41:03 +08:00
2025-04-29 18:04:33 +08:00
2025-07-10 14:14:02 +08:00
2025-04-29 18:04:33 +08:00
2025-04-29 18:04:33 +08:00
2025-04-18 15:54:22 +08:00
2025-06-26 16:43:26 +08:00
2025-04-29 18:04:33 +08:00
2025-03-21 17:41:03 +08:00
2025-03-21 17:41:03 +08:00
2025-04-03 18:19:11 +08:00
2025-05-28 20:06:58 +08:00
2025-07-09 10:12:40 +08:00
2025-07-09 10:12:40 +08:00
2025-06-20 19:55:58 +08:00
2025-03-21 17:41:03 +08:00
2025-04-06 17:56:08 +08:00
2025-03-21 17:41:03 +08:00
2025-03-21 17:41:03 +08:00
2025-04-14 15:45:23 +08:00
2025-04-29 18:04:33 +08:00
2025-04-09 12:10:17 +08:00
2025-04-18 15:54:22 +08:00
2025-07-01 10:42:11 +08:00
2025-04-03 18:19:11 +08:00
2025-05-15 12:38:20 +08:00
2025-03-21 17:41:03 +08:00
2025-07-15 14:10:50 +08:00
2025-03-21 17:41:03 +08:00
2025-03-21 17:41:03 +08:00
2025-06-05 15:47:42 +08:00
2025-04-29 18:04:33 +08:00
2025-03-21 17:41:03 +08:00
2025-04-18 16:53:43 +08:00
2025-07-04 21:54:33 +08:00
2025-02-17 17:05:13 +08:00
2025-04-29 18:04:33 +08:00
2025-03-21 17:41:03 +08:00
2025-04-03 18:19:11 +08:00
2025-03-21 17:41:03 +08:00
2025-05-20 12:07:50 +08:00
2025-04-05 14:56:54 +08:00
2025-06-24 09:10:30 +08:00
2025-05-28 17:45:08 +08:00
2025-03-21 17:41:03 +08:00
2025-03-21 17:41:03 +08:00
2025-06-27 10:36:01 +08:00
2025-07-16 09:59:42 +08:00
2025-03-21 17:41:03 +08:00
2025-04-18 16:53:43 +08:00
2025-04-29 18:04:33 +08:00
2025-07-16 11:26:54 +08:00
2025-02-17 17:05:13 +08:00
2025-04-29 18:04:33 +08:00
2025-04-06 17:56:08 +08:00
2025-06-09 15:44:49 +08:00
2025-03-21 17:41:03 +08:00
2025-05-14 09:06:14 +08:00
2025-05-14 09:06:14 +08:00