Skip to content

Commit

Permalink
JSON schema file for YAML configuration schema validation (winsw#656)
Browse files Browse the repository at this point in the history
* Create YamlConfigSchema.json

* Change file name

* Update YAML schema validation documentation

Fix typos

* Add descriptions to the configurations

* Update YAML schema validaion documentation

* Fix typo

* Update doc/yamlConfigurationSchema.json

* Update JSON shcema file

Co-authored-by: Oleg Nenashev <[email protected]>
  • Loading branch information
buddhikac96 and oleg-nenashev authored Aug 27, 2020
1 parent 43690d3 commit 6908d27
Show file tree
Hide file tree
Showing 2 changed files with 376 additions and 3 deletions.
13 changes: 10 additions & 3 deletions doc/yamlConfigFile.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Actual samples are also being published as part of releases on GitHub and NuGet.

## File structure

YAML Configuration file shuold be in following format
YAML Configuration file should be in following format

Example:

Expand All @@ -28,6 +28,13 @@ log:
mode: roll
```
## YAML configuration schema validation
Users can validate YAML configurations file against JSON schema.
You can use YAML utility tool for VSCode to validate your
YAML configurations file with this JSON schema.
[Download YAML utility tool for VSCode from Visual Studio Marketplace.](https://marketplace.visualstudio.com/items?itemName=redhat.vscode-yaml)
## Environment variable expansion
Configuration YAML files can include environment variable expansions of the form `%Name%`.
Expand Down Expand Up @@ -110,7 +117,7 @@ See the [Logging and error reporting](loggingAndErrorReporting.md) page for more
arguments: arg1 arg2 arg3
```

Also user can specify the arguemtns in more structured way with YAML multline strings.
Also user can specify the arguments in more structured way with YAML multiline strings.

```yaml
arguments: >
Expand Down Expand Up @@ -239,7 +246,7 @@ onFailure:

This optional element controls the timing in which Windows SCM resets the failure count.
For example, if you specify `resetfailure: 1 hour` and your service continues to run longer than one hour, then the failure count is reset to zero.
This affects the behaviour of the failure actions (see `onfailure` above).
This affects the behavior of the failure actions (see `onfailure` above).

In other words, this is the duration in which you consider the service has been running successfully.
Defaults to 1 day.
Expand Down
Loading

0 comments on commit 6908d27

Please sign in to comment.