Draft: conf data parser/validator reimplemenation
Implements #13 (closed)
YAML/JSON parser and data validator are now two separated modules. They are used to define two separated schemas.
-
SchemaParser +
dataclass
- creates parser for incoming YAML/JSON data
- looser type definitions for attributes
- supports partial change of data
- specifies the structure of the configuration file
- specifies default values of attributes
- exports
SchemaParse
object to YAML/JSON
-
SchemaValidator
- creates transformation and validation schema
- type definitions for attributes shoul be more strict
-
SchemaParser
object serves as input parameter - validation method for every
SchemaValidator
node must be implemented - transformation method for any attribute
- input for Lua configuration template
Some examples can be found in schema_parser and schema_validator tests.