Skip to content

Draft: conf data parser/validator reimplemenation

Aleš Mrázek requested to merge internal-config-datamodel into master

Implements #13 (closed)

YAML/JSON parser and data validator are now two separated modules. They are used to define two separated schemas.

  1. 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
  2. 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.

Merge request reports