Skip to content

Commit ebc4215

Browse files
authored
Added schema validation to devbox vscode extension (#1620)
## Summary tasks: - [x] Schemastore merges this pull request: SchemaStore/schemastore/pull/3386 - [x] devbox schema becomes available in [schemastore.org/json](https://www.schemastore.org/json/) - [ ] This PR gets merged - [ ] New devbox vscode extension gets published addresses #1576 ## How was it tested? - follow steps to generate custom vsix file and install it on vscode - or after the extension is published, update the extension to 0.1.3
1 parent e93a2f0 commit ebc4215

File tree

3 files changed

+18
-2
lines changed

3 files changed

+18
-2
lines changed

vscode-extension/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ All notable changes to the "devbox" extension will be documented in this file.
44

55
Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how to structure this file.
66

7+
## [0.1.3]
8+
9+
- Added json validation for devbox.json files.
10+
711
## [0.1.2]
812

913
- Fixed error handling when using `Reopen in Devbox shell` command in Windows and WSL

vscode-extension/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@ NOTE: Requires devbox CLI v0.5.5 and above
4242
reopen VSCode in devbox environment. Note: It requires devbox CLI v0.5.5 and above
4343
installed and in PATH.
4444

45+
### JSON validation when writing a devbox.json file
46+
47+
No need to take any action for this feature. When writing a devbox.json, if this extension is installed, it will validate and highlight any disallowed fields or values on a devbox.json file.
48+
4549
---
4650

4751
## Following extension guidelines

vscode-extension/package.json

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "devbox",
33
"displayName": "devbox by jetpack.io",
44
"description": "devbox integration for VSCode",
5-
"version": "0.1.2",
5+
"version": "0.1.3",
66
"icon": "assets/icon.png",
77
"repository": {
88
"type": "git",
@@ -21,7 +21,9 @@
2121
"onStartupFinished"
2222
],
2323
"main": "./out/extension.js",
24-
"extensionDependencies": ["ms-vscode-remote.remote-ssh"],
24+
"extensionDependencies": [
25+
"ms-vscode-remote.remote-ssh"
26+
],
2527
"contributes": {
2628
"commands": [
2729
{
@@ -113,6 +115,12 @@
113115
}
114116
]
115117
},
118+
"jsonValidation": [
119+
{
120+
"fileMatch": "devbox.json",
121+
"url": "https://raw.githubusercontent.com/jetpack-io/devbox/main/.schema/devbox.schema.json"
122+
}
123+
],
116124
"configuration": {
117125
"title": "devbox",
118126
"properties": {

0 commit comments

Comments
 (0)