
One-shot validation of configurations
validate_config.RdCheck if a configuration is in accordance with a JSON schema definition.
It is possible to either validate an existing list object in memory or an existing
yaml configuration file.
Details
See internal validator() documentation for more info on how the validation is done.
Examples
# Validate list object in memory
validate_list(
x = list(my_config_var = 1),
schema = system.file("examples/schema.json", package = "S7schema")
) |>
print()
#> $my_config_var
#> [1] 1
#>
# Validate yaml file on disk
validate_yaml(
file = system.file("examples/config.yml", package = "S7schema"),
schema = system.file("examples/schema.json", package = "S7schema")
) |>
print()
#> [1] "/home/runner/work/_temp/Library/S7schema/examples/config.yml"