Skip to content

Commit 25451cf

Browse files
committed
Add config section schema validation. Closes #186
Closes #186
1 parent 001d8f5 commit 25451cf

18 files changed

Lines changed: 1261 additions & 73 deletions

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1919
- Diagnostics: Added clickable diagnostic codes that link to documentation
2020
- Diagnostics: Added `emptyUrlsToWatch` warning when urlsToWatch array is empty
2121
- Diagnostics: Added `pluginConfigOptional` info when plugin can be configured with optional config section
22+
- Diagnostics: Added `invalidConfigSectionSchema` warning when config section schema version doesn't match installed Dev Proxy
23+
- Diagnostics: Added `unknownConfigProperty` warning when config section has properties not defined in its schema
24+
- Diagnostics: Added `invalidConfigValue` error when config section property value doesn't match schema requirements
2225
- Quick Fixes: Added fix to add optional plugin configuration (adds configSection + config)
2326
- Quick Fixes: Added fix to add missing config section when referenced but not defined
27+
- Quick Fixes: Added fix to update config section schema version (single or all at once)
28+
- Quick Fixes: Added fix to remove unknown config section properties
2429

2530
### Changed:
2631

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,13 +185,17 @@ Real-time validation of your configuration files. Click any diagnostic code to v
185185
| `pluginConfigMissing` | Referenced config section doesn't exist |
186186
| `pluginConfigOptional` | Plugin can be configured (optional) |
187187
| `pluginConfigNotRequired` | Plugin doesn't support configuration |
188+
| `invalidConfigSectionSchema` | Config section schema version doesn't match installed Dev Proxy |
189+
| `unknownConfigProperty` | Config section has property not defined in schema |
190+
| `invalidConfigValue` | Config section property value doesn't match schema |
188191

189192
### Quick Fixes
190193

191194
One-click fixes for common issues:
192195

193-
- **Update schema** - Match schema to installed Dev Proxy version
196+
- **Update schema** - Match schema to installed Dev Proxy version (config file or config sections)
194197
- **Update plugin path** - Fix deprecated `dev-proxy-plugins.dll` paths (single or all at once)
198+
- **Remove unknown property** - Remove properties not defined in config section schema
195199
- **Add languageModel configuration** - Enable language model for AI plugins
196200
- **Add plugin configuration** - Add optional config section for plugins that support it
197201
- **Add missing config section** - Create config section when plugin references one that doesn't exist

package-lock.json

Lines changed: 60 additions & 64 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@
256256
"devDependencies": {
257257
"@types/json-to-ast": "2.1.4",
258258
"@types/mocha": "10.0.10",
259-
"@types/node": "24.5.2",
259+
"@types/node": "^24.5.2",
260260
"@types/semver": "^7.7.1",
261261
"@types/sinon": "17.0.4",
262262
"@types/vscode": "1.101.0",
@@ -275,6 +275,7 @@
275275
"webpack-cli": "6.0.1"
276276
},
277277
"dependencies": {
278+
"ajv": "^8.17.1",
278279
"json-to-ast": "2.1.0",
279280
"semver": "7.7.2"
280281
}

0 commit comments

Comments
 (0)