Skip to content

Commit

Permalink
docs/developers: Encourage using rel_path in validate_manifest
Browse files Browse the repository at this point in the history
  • Loading branch information
nbraud committed Sep 12, 2016
1 parent 90da634 commit 34479f0
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions docs/developers/plugins.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 34479f0

Please sign in to comment.