PTU5KAS/docs
Claudius Heine 75fa095aa5 config: Added schema validation for configuration files
Currently many of the error messages regarding the configuration file
are not really helpful.

To improve reporting this patch adds validation of the configuration
files using the jsonschema module.

Example:

  Forgetting ':' at the end of a layer definition, like this:

    repos:
      meta-iot2000:
        layers:
          meta-iot2000-example
                              ^

  Exception before:

    TypeError: string indices must be integers

  Exception after:

    Validation Error:
     'meta-iot2000-example' is not of type 'object'

     Failed validating 'type' in schema['properties']['repos']['additionalProperties']['properties']['layers']:
         {'additionalProperties': {'oneOf': [{'type': 'null'},
                                             {'type': 'integer'},
                                             {'type': 'boolean'},
                                             {'type': 'string'}]},
          'type': 'object'}

     On instance['repos']['meta-iot2000']['layers']:
         'meta-iot2000-example'

This patch adds 'jsonschema' as an additional dependency.

Signed-off-by: Claudius Heine <ch@denx.de>
2017-10-13 14:11:10 +02:00
..
_static Fixed wrapping of cell content in readthedocs style 2017-06-28 15:12:15 +02:00
conf.py docs: Remove unused githubpages extension 2017-07-20 15:29:21 +02:00
devguide.rst Added link to the documentation in the documentation 2017-06-29 08:49:03 +02:00
format-changelog.rst Switch to separate config file version 2017-07-20 15:31:23 +02:00
index.rst Switch to separate config file version 2017-07-20 15:31:23 +02:00
intro.rst Made project buildable with rtd 2017-06-28 15:12:15 +02:00
Makefile Added initial sphinx documentation 2017-06-28 15:12:15 +02:00
userguide.rst config: Added schema validation for configuration files 2017-10-13 14:11:10 +02:00