Skip to content

Commit

Permalink
add yaml as json docs
Browse files Browse the repository at this point in the history
  • Loading branch information
GrantBirki committed Jun 25, 2023
1 parent 071cb0a commit 658dec9
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions docs/yaml_as_json.md
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
```

0 comments on commit 658dec9

Please sign in to comment.