Commit 09c1fe9
committed
refactor(Common): Make ProviderHandle optional in SourceControl DTOs
Modify `SourceControlGroupUpdateDTO` and `SourceControlUpdateDTO` to make the `ProviderHandle` field optional. Change the type from `u32` to `Option<u32>` and apply `#[serde(skip_serializing_if = "Option::is_none")]` to both structs.
This adjustment supports callers (specifically the SCM.rs effect) that pass the provider handle as a positional argument, allowing the DTO to be constructed without redundantly specifying the handle in the serialized payload. Update documentation comments to clarify the optional nature and usage pattern.
This enhances the flexibility of the SourceControl management interface while maintaining strict PascalCase naming and strict serialization contracts defined in the Common crate.1 parent bc9d5cf commit 09c1fe9
2 files changed
Lines changed: 8 additions & 4 deletions
Lines changed: 4 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
15 | | - | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
16 | 18 | | |
17 | 19 | | |
18 | 20 | | |
| |||
Lines changed: 4 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
15 | | - | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
16 | 18 | | |
17 | 19 | | |
18 | 20 | | |
| |||
0 commit comments