mirror of
https://github.com/kevingruesser/bootstrap-vz.git
synced 2025-08-22 09:50:37 +00:00
docs/developers: Encourage using rel_path in validate_manifest
This commit is contained in:
parent
90da634226
commit
34479f06f1
1 changed files with 2 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue