Skip to content

[Feature]: Publish a json schema for devbox.json #1576

@bbugh

Description

@bbugh

Thanks for devbox, it's so great.

Is your feature request related to a problem you're trying to solve? Please describe.

Yes, having a schema allows for easy command line/CI verification to catch runtime errors before getting to CI, and editors can offer auto complete.

Describe the solution you'd like
I'd love to see an official JSON schema published for the devbox.json configuration.

Describe alternatives you've considered
Not having one 😢

Additional context

A good example of how to do this is devcontainers/spec. They publish here https://github.com/devcontainers/spec/blob/main/schemas/devContainer.schema.json

and you can reference it in as the schema using the github raw file:

{ 
  "$schema": "https://raw.githubusercontent.com/devcontainers/spec/main/schemas/devContainer.schema.json"
}

In the case of devbox, you could also do it by tag so it's tracked alongside the same version of devbox

{
  "$schema": "https://raw.githubusercontent.com/jetpack-io/devbox/0.7.1/schemas/devbox-config.schema.json",
  "packages": [
    "ffmpeg_6@6.0",
  ],
}

Metadata

Metadata

Assignees

Labels

featureNew feature or request

Type

No type

Projects

Status

Merged

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions