Skip to content

Commit

Permalink
feat: add JSON-schema validation for functions (#284)
Browse files Browse the repository at this point in the history
Signed-off-by: Romain Beuque <[email protected]>
  • Loading branch information
rbeuque74 authored Jul 26, 2021
1 parent 61ea19f commit 8debe2c
Show file tree
Hide file tree
Showing 3 changed files with 754 additions and 2 deletions.
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -691,7 +691,7 @@ Declared `resource_limits` must be positive integers. When a step is executed, i

### Task templates validation

A JSON-schema file is available to validate the syntax of task templates, it's available in `hack/template-schema.json`.
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`.

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

Expand All @@ -703,7 +703,12 @@ Validation can be performed at writing time if you are using a modern IDE or edi
```json
{
"yaml.schemas": {
"./hack/template-schema.json": ["/*.yaml"]
".vscode/template-schema.json": [
"/templates*/*.yaml"
],
".vscode/function-schema.json": [
"/functions/*.yaml"
]
}
}
```
Expand Down
Loading

0 comments on commit 8debe2c

Please sign in to comment.