docs/developers: Encourage using rel_path in validate_manifest

This commit is contained in:
Nicolas Braud-Santoni 2016-09-12 19:20:22 +02:00
parent 90da634226
commit 34479f06f1
No known key found for this signature in database
GPG key ID: 9D4F88010CFE19E3

View file

@ -66,9 +66,8 @@ Typically it looks like this:
.. code-block:: python
def validate_manifest(data, validator, error):
import os.path
schema_path = os.path.normpath(os.path.join(os.path.dirname(__file__), 'manifest-schema.yml'))
validator(data, schema_path)
from bootstrapvz.common.tools import rel_path
validator(data, rel_path(__file__, 'manifest-schema.yml'))
This code validates the manifest against a schema in your plugin folder.
The schema is a `JSON schema <http://json-schema.org/>`__, since bootstrap-vz