Skip to content

Commit 953fc29

Browse files
authored
feat: point to published schema instead of writing a local file (#213)
1 parent 1cefe36 commit 953fc29

File tree

2 files changed

+1
-12
lines changed

2 files changed

+1
-12
lines changed

pkg/config/config.go

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -308,17 +308,6 @@ func WriteDefaultConfig(path string, force bool) error {
308308
)
309309
}
310310

311-
// Write the JSON schema file alongside the config file.
312-
schemaPath := filepath.Join(filepath.Dir(path), "config.v1beta1.json")
313-
slog.Debug("write JSON schema",
314-
slog.String("path", schemaPath),
315-
)
316-
317-
err = os.WriteFile(schemaPath, schemaJSON, 0o600)
318-
if err != nil {
319-
return fmt.Errorf("write schema file: %w", err)
320-
}
321-
322311
return nil
323312
}
324313

pkg/config/config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# yaml-language-server: $schema=./config.v1beta1.json
1+
# yaml-language-server: $schema=https://jacobcolvin.com/kat/schemas/config.v1beta1.json
22
apiVersion: kat.jacobcolvin.com/v1beta1
33
kind: Configuration
44

0 commit comments

Comments
 (0)