From 48e4a7941a4c1351076a2edf23274b41b19eab19 Mon Sep 17 00:00:00 2001 From: Tiago Gomes Date: Mon, 7 Dec 2015 17:26:17 +0000 Subject: Add JSON schemas They will be used for validating the morphologies in a future commit. These were copied from [1], with the following changes: * The field unpetrify-ref can be of type number in addition to type string * Build commands can be of type boolean in addition to type string * minItems were set for some fields of type array [1]: http://git.baserock.org/cgi-bin/cgit.cgi/baserock/baserock/definitions.git/tree/schemas Change-Id: I962188ad5774472f08b10f6dfff8aac7a106ef23 --- morphlib/util.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'morphlib/util.py') diff --git a/morphlib/util.py b/morphlib/util.py index ba170952..0c3291c2 100644 --- a/morphlib/util.py +++ b/morphlib/util.py @@ -780,7 +780,7 @@ class ProgressBar(object): sys.stderr.flush() -def schemas_directory(): # pragma: no cover +def schemas_directory(version): # pragma: no cover '''Returns a path to the schemas/ subdirectory of the 'morphlib' module.''' code_dir = os.path.dirname(morphlib.__file__) - return os.path.join(code_dir, 'schemas') + return os.path.join(code_dir, 'schemas', str(version)) -- cgit v1.2.1