Skip to content

Added schema validation to devbox vscode extension #1620

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Nov 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions vscode-extension/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ All notable changes to the "devbox" extension will be documented in this file.

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

## [0.1.3]

- Added json validation for devbox.json files.

## [0.1.2]

- Fixed error handling when using `Reopen in Devbox shell` command in Windows and WSL
Expand Down
4 changes: 4 additions & 0 deletions vscode-extension/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ NOTE: Requires devbox CLI v0.5.5 and above
reopen VSCode in devbox environment. Note: It requires devbox CLI v0.5.5 and above
installed and in PATH.

### JSON validation when writing a devbox.json file

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.

---

## Following extension guidelines
Expand Down
12 changes: 10 additions & 2 deletions vscode-extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "devbox",
"displayName": "devbox by jetpack.io",
"description": "devbox integration for VSCode",
"version": "0.1.2",
"version": "0.1.3",
"icon": "assets/icon.png",
"repository": {
"type": "git",
Expand All @@ -21,7 +21,9 @@
"onStartupFinished"
],
"main": "./out/extension.js",
"extensionDependencies": ["ms-vscode-remote.remote-ssh"],
"extensionDependencies": [
"ms-vscode-remote.remote-ssh"
],
"contributes": {
"commands": [
{
Expand Down Expand Up @@ -113,6 +115,12 @@
}
]
},
"jsonValidation": [
{
"fileMatch": "devbox.json",
"url": "https://raw.githubusercontent.com/jetpack-io/devbox/main/.schema/devbox.schema.json"
}
],
"configuration": {
"title": "devbox",
"properties": {
Expand Down