Skip to content

Commit 8debe2c

Browse files
authored
feat: add JSON-schema validation for functions (#284)
Signed-off-by: Romain Beuque <[email protected]>
1 parent 61ea19f commit 8debe2c

File tree

3 files changed

+754
-2
lines changed

3 files changed

+754
-2
lines changed

README.md

+7-2
Original file line numberDiff line numberDiff line change
@@ -691,7 +691,7 @@ Declared `resource_limits` must be positive integers. When a step is executed, i
691691

692692
### Task templates validation
693693

694-
A JSON-schema file is available to validate the syntax of task templates, it's available in `hack/template-schema.json`.
694+
A JSON-schema file is available to validate the syntax of task templates and functions, it's available in files `hack/template-schema.json` and `hack/function-schema.json`.
695695

696696
Validation can be performed at writing time if you are using a modern IDE or editor.
697697

@@ -703,7 +703,12 @@ Validation can be performed at writing time if you are using a modern IDE or edi
703703
```json
704704
{
705705
"yaml.schemas": {
706-
"./hack/template-schema.json": ["/*.yaml"]
706+
".vscode/template-schema.json": [
707+
"/templates*/*.yaml"
708+
],
709+
".vscode/function-schema.json": [
710+
"/functions/*.yaml"
711+
]
707712
}
708713
}
709714
```

0 commit comments

Comments
 (0)