Skip to content

Commit a3c57f3

Browse files
committed
docs: Add details about new API for getting schema
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
1 parent 2cb25ae commit a3c57f3

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

website/docs/editor-support.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,23 @@ title: Editor Support
55
We provide a [JSON schema file](https://github.com/project-dalec/dalec/blob/main/docs/spec.schema.json) to integrate with your editor.
66
This will help validate your yaml files and provide intellisense for the spec.
77

8+
Alternatively, the schema can be fetched from the dalec frontend starting with v0.20:
9+
10+
### With an existing spec
11+
12+
```bash
13+
docker buildx build --call dalec.schema -< path/to/spec
14+
```
15+
16+
This loads the version of dalec set in the "syntax" directive of the spec file.
17+
18+
### Without a spec
19+
20+
```bash
21+
# Provide an empty spec to stdin and set the buildkit frontend parser with the `BUILDKIT_SYNTAX` build arg.
22+
docker buildx build --call dalec.schema --build-arg BUILDKIT_SYNTAX=ghcr.io/project-dalec/frontend:latest -<<<'{}'
23+
```
24+
825
## VSCode
926

1027
For VSCode you'll need to use a YAML plugin that supports JSON schemas, such as [YAML Support by Red Hat](https://marketplace.visualstudio.com/items?itemName=redhat.vscode-yaml).

0 commit comments

Comments
 (0)