Provides a generic framework for working with YAML (YAML Ain't Markup Language) configuration files. Uses 'ajv' (Another JSON Schema Validator) via 'V8' to validate configurations against JSON Schema definitions. Configuration objects inherit from 'S7' classes and base lists, supporting downstream extension through custom classes and methods.

S7schema provides a generic way of working with yaml config files. The
main functionality is captured in the S7schema() class that:
list ensuring a seamless integration into existing
code using the configuration entries.# Install the latest released version from CRAN:
install.packages("S7schema")
# Install the development version from GitHub:
pak::pak("NovoNordisk-OpenSource/S7schema")
library(S7schema)
A new instance of an S7schema class can be initiated with:
config <- S7schema("path/to/my/config.yml", "path/to/my/schema.json")
Since config is a list it can be updated (here adding an “a” element):
config$a <- 2
And it can be validated again:
validate(config)
Which will now throw an error if a = 2 is an illegal entry according
to the schema in "path/to/my/schema.json".
vignette("S7schema") — Getting startedvignette("use-in-package") — Use S7schema in your package