-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #14 from GrantBirki/yaml-as-json-docs
Yaml as json docs
- Loading branch information
Showing
5 changed files
with
21 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
bad data: oh no | ||
bad data: oh no |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
foo: 1 | ||
bar: abc | ||
bar: abc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# YAML as JSON | ||
|
||
By setting the the `yaml_as_json` input option to `"true"`, you can treat YAML files as JSON so that they can be validated with the same schema as JSON files. This is useful as the [yaml validator](https://github.com/ketanSaxena/schema-validator) is rather limited in its capabilities. This means any matching YAML files will be validated with the configured `json_schema` rather than the `yaml_schema`. | ||
|
||
Here is an example of how to use this feature: | ||
|
||
```yaml | ||
- name: json-yaml-validate | ||
id: json-yaml-validate | ||
uses: GrantBirki/[email protected] # replace with the latest version | ||
with: | ||
yaml_as_json: "true" # enable yaml as json mode | ||
``` |