Commit 39a1814
authored
🧾 Fix inherited properties documentation in MigrationTools.ConsoleDataGenerator (#2748)
## Problem
The `MigrationTools.ConsoleDataGenerator` was not properly resolving XML
documentation for inherited properties, resulting in "missing XML code
comments" entries in generated YAML files for properties that actually
had documentation in base classes or interfaces.
Examples of affected properties:
- `ApplyTo` in all FieldMap options (inherited from `IFieldMapOptions`)
- `SourceName` and `TargetName` in processor options (inherited from
base processor classes)
- Many other inherited properties across endpoints, tools, and enrichers
## Solution
Enhanced the `CodeDocumentation` class to traverse inheritance
hierarchies when XML documentation is not found in the declaring type:
### Changes Made
1. **Updated `GetPropertyData` method** to use inheritance chain
traversal when documentation is missing
2. **Updated `GetPropertyDefault` method** to use the same traversal for
default value documentation
3. **Added helper methods**:
- `GetPropertyDocumentationFromType()` - Safe XML lookup for specific
type
- `GetPropertyXmlFromType()` - Safe XML element retrieval
- `GetPropertyDocumentationFromInheritanceChain()` - Traverses
interfaces then base classes
- `GetPropertyXmlFromInheritanceChain()` - Same traversal for XML
elements
### Inheritance Traversal Logic
1. First attempts to find documentation in the property's declaring type
(existing behavior)
2. If not found, checks all implemented interfaces for the property
3. If still not found, walks up the base class hierarchy
4. Returns the first documentation found, or falls back to "missing XML
code comments"
## Results
✅ **All FieldMap `ApplyTo` properties** now show proper documentation:
```yaml
- parameterName: ApplyTo
type: List
description: A list of Work Item Types that this Field Map will apply to. If the list is empty it will apply to all Work Item Types. You can use "*" to apply to all Work Item Types.
```
✅ **All Processor `SourceName`/`TargetName` properties** now show proper
documentation instead of "missing XML code comments"
✅ **85 documentation files updated** with resolved inherited property
documentation
✅ **Minimal impact**: Most files show only 1-3 line changes, replacing
missing documentation with actual content
## Testing
- Verified inheritance chain traversal works for interfaces and base
classes
- Confirmed existing documentation remains unaffected
- Tested across all option types (FieldMaps, Processors, Tools,
Endpoints, ProcessorEnrichers, EndpointEnrichers)
- Zero instances of "missing XML code comments" remain for previously
inherited properties
Fixes #2747.
<!-- START COPILOT CODING AGENT TIPS -->
---
💬 Share your feedback on Copilot coding agent for the chance to win a
$200 gift card! Click
[here](https://survey.alchemer.com/s3/8343779/Copilot-Coding-agent) to
start the survey.File tree
107 files changed
+2427
-289
lines changed- docs
- _data
- collections/_reference
- src/MigrationTools.ConsoleDataGenerator
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
107 files changed
+2427
-289
lines changedLines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
69 | | - | |
| 69 | + | |
70 | 70 | | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
117 | 117 | | |
118 | 118 | | |
119 | 119 | | |
120 | | - | |
121 | | - | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
Lines changed: 6 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
116 | | - | |
117 | | - | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
Lines changed: 6 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
57 | | - | |
58 | | - | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
Lines changed: 19 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
62 | | - | |
63 | | - | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
Lines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
81 | | - | |
| 81 | + | |
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
| |||
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
69 | | - | |
| 69 | + | |
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
| |||
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
71 | | - | |
| 71 | + | |
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
| |||
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
79 | | - | |
| 79 | + | |
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
| |||
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
0 commit comments