Skip to content

Commit 59bc659

Browse files
authored
Validate Config Against Schema (minor bump) (#2935)
This adds proper schema validation! Hence the minor bump... this will require that the docs be rebuilt (to regenerate the schema) before any deploy... If your Config does not conform, then you will be kicked. +semver: minor
2 parents 977d058 + 0005a54 commit 59bc659

File tree

124 files changed

+4478
-2198
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

124 files changed

+4478
-2198
lines changed

.vscode/launch.json

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
55
"version": "0.2.0",
66
"configurations": [
7+
78
{
89
"name": "PowerShell Launch Current File",
910
"type": "PowerShell",
@@ -15,16 +16,23 @@
1516
"name": "Full execute",
1617
"type": "clr",
1718
"request": "launch",
18-
"preLaunchTask": "build full framework",
19-
"program": "${workspaceFolder}/src/MigrationTools.ConsoleFull/bin/Debug/net472/migration.exe",
19+
// Use a lightweight build to avoid long pre-launch chains that delay debugger attach
20+
"preLaunchTask": "build",
21+
// Full .NET Framework exe built for net472 – coreclr debugger can launch it.
22+
"program": "${workspaceFolder}/src/MigrationTools.ConsoleFull/bin/Debug/net472/devopsmigration.exe",
2023
"args": [
2124
"execute",
2225
"-c",
23-
"configuration.json"
26+
"configuration-default.json"
2427
],
25-
"cwd": "${workspaceFolder}/src/MigrationTools.ConsoleFull/bin/Debug/net472/",
28+
"cwd": "${workspaceFolder}/src/MigrationTools.ConsoleFull/bin/Debug/net472",
29+
// Use external terminal so it opens a new window and stays after exit (pause handled in code when env var set)
2630
"console": "externalTerminal",
27-
"stopAtEntry": false
31+
"stopAtEntry": false,
32+
"justMyCode": true,
33+
"env": {
34+
"MIGRATIONTOOLS_PAUSE_ON_EXIT": "1"
35+
}
2836
},
2937
{
3038
"name": "Attach to .NET Functions",

.vscode/tasks.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,9 @@
3939
"isDefault": true
4040
},
4141
"presentation": {
42+
// Use a single dedicated panel so repeated launches do not create many terminals
4243
"reveal": "always",
43-
"panel": "new"
44+
"panel": "dedicated"
4445
}
4546
},
4647
{
@@ -83,8 +84,9 @@
8384
"command": "${workspaceFolder}/GenerateDocs.ps1",
8485
"group": "build",
8586
"presentation": {
87+
// Share panel with prior executions instead of creating a new terminal each time
8688
"reveal": "always",
87-
"panel": "new"
89+
"panel": "dedicated"
8890
},
8991
"problemMatcher": "$msCompile"
9092
},

buildDocs.ps1

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ $msBuildExe = 'C:\Program Files (x86)\MSBuild\14.0\Bin\msbuild.exe'
22
& nuget restore
33
& "$($msBuildExe)" "MigrationTools.sln" /t:Build /m
44

5-
& ".\src\MigrationTools.ConsoleFull\bin\Debug\net472\migration.exe" init --config ".\docs\Reference\Generated\configuration.config"
6-
& ".\src\MigrationTools.ConsoleFull\bin\Debug\net472\migration.exe" init --options Full --config ".\docs\Reference\Generated\configuration-Full.config"
7-
& ".\src\MigrationTools.ConsoleFull\bin\Debug\net472\migration.exe" init --options WorkItemTracking --config ".\docs\Reference\Generated\configuration-WorkItemTracking.config"
8-
& ".\src\MigrationTools.ConsoleFull\bin\Debug\net472\migration.exe" init --options Fullv2 --config ".\docs\Reference\Generated\configuration-Fullv2.config"
9-
& ".\src\MigrationTools.ConsoleFull\bin\Debug\net472\migration.exe" init --options WorkItemTrackingv2 --config ".\docs\Reference\Generated\configuration-WorkItemTrackingv2.config"
5+
& ".\src\MigrationTools.ConsoleFull\bin\Debug\net472\devopsmigration.exe" init --config ".\docs\Reference\Generated\configuration.config"
6+
& ".\src\MigrationTools.ConsoleFull\bin\Debug\net472\devopsmigration.exe" init --options Full --config ".\docs\Reference\Generated\configuration-Full.config"
7+
& ".\src\MigrationTools.ConsoleFull\bin\Debug\net472\devopsmigration.exe" init --options WorkItemTracking --config ".\docs\Reference\Generated\configuration-WorkItemTracking.config"
8+
& ".\src\MigrationTools.ConsoleFull\bin\Debug\net472\devopsmigration.exe" init --options Fullv2 --config ".\docs\Reference\Generated\configuration-Fullv2.config"
9+
& ".\src\MigrationTools.ConsoleFull\bin\Debug\net472\devopsmigration.exe" init --options WorkItemTrackingv2 --config ".\docs\Reference\Generated\configuration-WorkItemTrackingv2.config"
1010

1111

1212

configuration-default.json

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -5,26 +5,26 @@
55
"MigrationTools": {
66
"Version": "16.0",
77
"Endpoints": {
8-
"Source": {
9-
"EndpointType": "TfsTeamProjectEndpoint",
10-
"Collection": "https://dev.azure.com/nkdagility-preview/",
11-
"Project": "migrationSource1",
12-
"AllowCrossProjectLinking": false,
13-
"ReflectedWorkItemIdField": "Custom.ReflectedWorkItemId",
14-
"Authentication": {
15-
"AuthenticationMode": "AccessToken",
16-
"AccessToken": "",
17-
"NetworkCredentials": {
18-
"UserName": "",
19-
"Password": "",
20-
"Domain": ""
21-
}
8+
"Source": {
9+
"EndpointType": "TfsTeamProjectEndpoint",
10+
"missing": "https://dev.azure.com/nkdagility-preview/",
11+
"missing2": "migrationSource1",
12+
"AllowCrossProjectLinking": false,
13+
"ReflectedWorkItemIdField": "Custom.ReflectedWorkItemId",
14+
"Authentication": {
15+
"AuthenticationMode": "AccessToken",
16+
"AccessToken": "",
17+
"NetworkCredentials": {
18+
"UserName": "",
19+
"Password": "",
20+
"Domain": ""
21+
}
22+
},
23+
"LanguageMaps": {
24+
"AreaPath": "Area",
25+
"IterationPath": "Iteration"
26+
}
2227
},
23-
"LanguageMaps": {
24-
"AreaPath": "Area",
25-
"IterationPath": "Iteration"
26-
}
27-
},
2828
"Target": {
2929
"EndpointType": "TfsTeamProjectEndpoint",
3030
"Collection": "https://dev.azure.com/nkdagility-preview/",
@@ -180,4 +180,4 @@
180180
}
181181
]
182182
}
183-
}
183+
}

docs/data/classes/reference.endpoints.azuredevopsendpoint.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,34 +47,50 @@ options:
4747
type: String
4848
description: Personal Access Token (PAT) or other authentication token for accessing the Azure DevOps organization. Required for API authentication.
4949
defaultValue: missing XML code comments
50+
isRequired: true
51+
dotNetType: System.String, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e
5052
- parameterName: AuthenticationMode
5153
type: AuthenticationMode
5254
description: Authentication mode to use when connecting to Azure DevOps. Typically uses AccessToken for modern Azure DevOps organizations.
5355
defaultValue: missing XML code comments
56+
isRequired: true
57+
dotNetType: MigrationTools.Endpoints.AuthenticationMode, MigrationTools, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
5458
- parameterName: Enabled
5559
type: Boolean
5660
description: Will be used if enabled
5761
defaultValue: missing XML code comments
62+
isRequired: false
63+
dotNetType: System.Boolean, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e
5864
- parameterName: EndpointEnrichers
5965
type: List
6066
description: missing XML code comments
6167
defaultValue: missing XML code comments
68+
isRequired: false
69+
dotNetType: System.Collections.Generic.List`1[[MigrationTools.EndpointEnrichers.IEndpointEnricherOptions, MigrationTools, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]], System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e
6270
- parameterName: Name
6371
type: String
6472
description: missing XML code comments
6573
defaultValue: missing XML code comments
74+
isRequired: false
75+
dotNetType: System.String, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e
6676
- parameterName: Organisation
6777
type: String
6878
description: URL of the Azure DevOps organization (e.g., "https://dev.azure.com/myorganization/"). Must include the full organization URL.
6979
defaultValue: missing XML code comments
80+
isRequired: true
81+
dotNetType: System.String, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e
7082
- parameterName: Project
7183
type: String
7284
description: Name of the Azure DevOps project within the organization to connect to. This is the project that will be used for migration operations.
7385
defaultValue: missing XML code comments
86+
isRequired: true
87+
dotNetType: System.String, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e
7488
- parameterName: ReflectedWorkItemIdField
7589
type: String
7690
description: Name of the custom field used to store the reflected work item ID for tracking migrated items. Typically "Custom.ReflectedWorkItemId".
7791
defaultValue: missing XML code comments
92+
isRequired: true
93+
dotNetType: System.String, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e
7894
status: missing XML code comments
7995
processingTarget: missing XML code comments
8096
classFile: src/MigrationTools.Clients.AzureDevops.Rest/Endpoints/AzureDevOpsEndpoint.cs

docs/data/classes/reference.endpoints.filesystemworkitemendpoint.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,18 +28,26 @@ options:
2828
type: Boolean
2929
description: Will be used if enabled
3030
defaultValue: missing XML code comments
31+
isRequired: false
32+
dotNetType: System.Boolean, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e
3133
- parameterName: EndpointEnrichers
3234
type: List
3335
description: missing XML code comments
3436
defaultValue: missing XML code comments
37+
isRequired: false
38+
dotNetType: System.Collections.Generic.List`1[[MigrationTools.EndpointEnrichers.IEndpointEnricherOptions, MigrationTools, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]], System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e
3539
- parameterName: FileStore
3640
type: String
3741
description: Path to the directory where work item data will be stored or read from. This should be a valid local file system path with appropriate read/write permissions.
3842
defaultValue: missing XML code comments
43+
isRequired: false
44+
dotNetType: System.String, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e
3945
- parameterName: Name
4046
type: String
4147
description: missing XML code comments
4248
defaultValue: missing XML code comments
49+
isRequired: false
50+
dotNetType: System.String, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e
4351
status: missing XML code comments
4452
processingTarget: missing XML code comments
4553
classFile: src/MigrationTools.Clients.FileSystem/Endpoints/FileSystemWorkItemEndpoint.cs

docs/data/classes/reference.endpoints.tfsendpoint.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,38 +98,56 @@ options:
9898
type: Boolean
9999
description: When true, allows work items to link to items in different projects within the same collection. Default is false for security and organizational clarity.
100100
defaultValue: missing XML code comments
101+
isRequired: false
102+
dotNetType: System.Boolean, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e
101103
- parameterName: Authentication
102104
type: TfsAuthenticationOptions
103105
description: Authentication configuration for connecting to the TFS server. Supports various authentication modes including Windows authentication and access tokens.
104106
defaultValue: missing XML code comments
107+
isRequired: true
108+
dotNetType: MigrationTools.Endpoints.Infrastructure.TfsAuthenticationOptions, MigrationTools.Clients.TfsObjectModel, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
105109
- parameterName: Collection
106110
type: Uri
107111
description: URI of the TFS collection (e.g., "http://tfsserver:8080/tfs/DefaultCollection"). Must be a valid absolute URL pointing to the TFS collection.
108112
defaultValue: missing XML code comments
113+
isRequired: true
114+
dotNetType: System.Uri, System.Private.Uri, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
109115
- parameterName: Enabled
110116
type: Boolean
111117
description: Will be used if enabled
112118
defaultValue: missing XML code comments
119+
isRequired: false
120+
dotNetType: System.Boolean, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e
113121
- parameterName: EndpointEnrichers
114122
type: List
115123
description: missing XML code comments
116124
defaultValue: missing XML code comments
125+
isRequired: false
126+
dotNetType: System.Collections.Generic.List`1[[MigrationTools.EndpointEnrichers.IEndpointEnricherOptions, MigrationTools, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]], System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e
117127
- parameterName: LanguageMaps
118128
type: TfsLanguageMapOptions
119129
description: Language mapping configuration for translating area and iteration path names between different language versions of TFS.
120130
defaultValue: missing XML code comments
131+
isRequired: true
132+
dotNetType: MigrationTools.Endpoints.TfsLanguageMapOptions, MigrationTools.Clients.TfsObjectModel, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
121133
- parameterName: Name
122134
type: String
123135
description: missing XML code comments
124136
defaultValue: missing XML code comments
137+
isRequired: false
138+
dotNetType: System.String, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e
125139
- parameterName: Project
126140
type: String
127141
description: Name of the TFS project within the collection to connect to. This is the project that will be used for migration operations.
128142
defaultValue: missing XML code comments
143+
isRequired: true
144+
dotNetType: System.String, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e
129145
- parameterName: ReflectedWorkItemIdField
130146
type: String
131147
description: Name of the custom field used to store the reflected work item ID for tracking migrated items. Typically "Custom.ReflectedWorkItemId".
132148
defaultValue: missing XML code comments
149+
isRequired: true
150+
dotNetType: System.String, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e
133151
status: missing XML code comments
134152
processingTarget: missing XML code comments
135153
classFile: src/MigrationTools.Clients.TfsObjectModel/EndPoints/TfsEndpoint.cs

docs/data/classes/reference.endpoints.tfsteamprojectendpoint.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,38 +94,56 @@ options:
9494
type: Boolean
9595
description: When true, allows work items to link to items in different projects within the same collection. Default is false for security and organizational clarity.
9696
defaultValue: missing XML code comments
97+
isRequired: false
98+
dotNetType: System.Boolean, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e
9799
- parameterName: Authentication
98100
type: TfsAuthenticationOptions
99101
description: Authentication configuration for connecting to the TFS server. Supports various authentication modes including Windows authentication and access tokens.
100102
defaultValue: missing XML code comments
103+
isRequired: true
104+
dotNetType: MigrationTools.Endpoints.Infrastructure.TfsAuthenticationOptions, MigrationTools.Clients.TfsObjectModel, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
101105
- parameterName: Collection
102106
type: Uri
103107
description: URI of the TFS collection (e.g., "http://tfsserver:8080/tfs/DefaultCollection"). Must be a valid absolute URL pointing to the TFS collection.
104108
defaultValue: missing XML code comments
109+
isRequired: true
110+
dotNetType: System.Uri, System.Private.Uri, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
105111
- parameterName: Enabled
106112
type: Boolean
107113
description: Will be used if enabled
108114
defaultValue: missing XML code comments
115+
isRequired: false
116+
dotNetType: System.Boolean, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e
109117
- parameterName: EndpointEnrichers
110118
type: List
111119
description: missing XML code comments
112120
defaultValue: missing XML code comments
121+
isRequired: false
122+
dotNetType: System.Collections.Generic.List`1[[MigrationTools.EndpointEnrichers.IEndpointEnricherOptions, MigrationTools, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]], System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e
113123
- parameterName: LanguageMaps
114124
type: TfsLanguageMapOptions
115125
description: Language mapping configuration for translating area and iteration path names between different language versions of TFS.
116126
defaultValue: missing XML code comments
127+
isRequired: true
128+
dotNetType: MigrationTools.Endpoints.TfsLanguageMapOptions, MigrationTools.Clients.TfsObjectModel, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
117129
- parameterName: Name
118130
type: String
119131
description: missing XML code comments
120132
defaultValue: missing XML code comments
133+
isRequired: false
134+
dotNetType: System.String, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e
121135
- parameterName: Project
122136
type: String
123137
description: Name of the TFS project within the collection to connect to. This is the project that will be used for migration operations.
124138
defaultValue: missing XML code comments
139+
isRequired: true
140+
dotNetType: System.String, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e
125141
- parameterName: ReflectedWorkItemIdField
126142
type: String
127143
description: Name of the custom field used to store the reflected work item ID for tracking migrated items. Typically "Custom.ReflectedWorkItemId".
128144
defaultValue: missing XML code comments
145+
isRequired: true
146+
dotNetType: System.String, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e
129147
status: missing XML code comments
130148
processingTarget: missing XML code comments
131149
classFile: src/MigrationTools.Clients.TfsObjectModel/EndPoints/TfsTeamProjectEndpoint.cs

0 commit comments

Comments
 (0)