From 34479f06f12c4d6bcae3e36d4fb504a8504bce4a Mon Sep 17 00:00:00 2001 From: Nicolas Braud-Santoni Date: Mon, 12 Sep 2016 19:20:22 +0200 Subject: [PATCH] docs/developers: Encourage using rel_path in validate_manifest --- docs/developers/plugins.rst | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/docs/developers/plugins.rst b/docs/developers/plugins.rst index a8ff8e0..dedc3dd 100644 --- a/docs/developers/plugins.rst +++ b/docs/developers/plugins.rst @@ -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 `__, since bootstrap-vz