From 3e9bbcd897812e64d3a356dcd5806baeec198d65 Mon Sep 17 00:00:00 2001 From: mo khan Date: Wed, 15 Jan 2020 15:11:58 -0700 Subject: Validate version # --- spec/fixtures/schema/v2.0.json | 30 ++++++++++++++++++++++-------- 1 file changed, 22 insertions(+), 8 deletions(-) (limited to 'spec/fixtures') diff --git a/spec/fixtures/schema/v2.0.json b/spec/fixtures/schema/v2.0.json index 712143b..6ade7ad 100644 --- a/spec/fixtures/schema/v2.0.json +++ b/spec/fixtures/schema/v2.0.json @@ -7,7 +7,10 @@ "dependencies" ], "properties": { - "version": { "type": "string" }, + "version": { + "type": "string", + "pattern": "^[0-9]+\\.[0-9]+$" + }, "licenses": { "type": "array", "items": { @@ -18,9 +21,15 @@ "url" ], "properties": { - "id": { "type": "string" }, - "name": { "type": "string" }, - "url": { "type": "uri" } + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "url": { + "type": "uri" + } } } }, @@ -36,9 +45,15 @@ "licenses" ], "properties": { - "name": { "type": "string" }, - "url": { "type": "uri" }, - "description": { "type": "string" }, + "name": { + "type": "string" + }, + "url": { + "type": "uri" + }, + "description": { + "type": "string" + }, "paths": { "type": "array", "items": { @@ -57,4 +72,3 @@ }, "additionalProperties": false } - -- cgit v1.2.3