From fc11375df5bd470d9a3e00ac0720b53ec157638a Mon Sep 17 00:00:00 2001 From: Isuru Liyanage Date: Tue, 27 Jul 2021 13:58:07 +0100 Subject: [PATCH 1/2] add graph_restriction custom keyword to bio-validator --- examples/schemas/graphRestriction-schema.json | 2 +- src/validator.js | 4 +++- validator-cli.js | 0 3 files changed, 4 insertions(+), 2 deletions(-) mode change 100644 => 100755 validator-cli.js diff --git a/examples/schemas/graphRestriction-schema.json b/examples/schemas/graphRestriction-schema.json index e78aef9..20868bf 100644 --- a/examples/schemas/graphRestriction-schema.json +++ b/examples/schemas/graphRestriction-schema.json @@ -40,4 +40,4 @@ } }, "type": "object" -} \ No newline at end of file +} diff --git a/src/validator.js b/src/validator.js index ba73cf6..c3acb9f 100644 --- a/src/validator.js +++ b/src/validator.js @@ -2,12 +2,14 @@ const logger = require("./winston"); const ValidationError = require("./model/validation-error"); const AppError = require("./model/application-error"); const BioValidator = require("./bio-validator"); +const GraphRestriction = require("./keywords/graph_restriction"); const { isChildTermOf, isValidTerm, isValidTaxonomy } = require("./keywords"); const validator = new BioValidator([ new isChildTermOf(null, "https://www.ebi.ac.uk/ols/api/search?q="), new isValidTerm(null, "https://www.ebi.ac.uk/ols/api/search?q="), - new isValidTaxonomy(null) + new isValidTaxonomy(null), + new GraphRestriction(null, "https://www.ebi.ac.uk/ols/api") ]); function convertToValidationErrors(ajvErrorObjects) { diff --git a/validator-cli.js b/validator-cli.js old mode 100644 new mode 100755 From 57a6eefb7b2be179d00ca1f48ad31c9d054d8275 Mon Sep 17 00:00:00 2001 From: Isuru Liyanage Date: Wed, 27 Oct 2021 10:12:48 +0100 Subject: [PATCH 2/2] bump patch version --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 5597e92..c6a603d 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "biovalidator", - "version": "1.9.0", - "description": "A nodejs JSON schema validator service.", + "version": "1.9.1", + "description": "A nodejs JSON schema validator service. Extended from Ajv to include ontology validation.", "main": "src/server.js", "repository": "https://github.com/elixir-europe/biovalidator.git", "scripts": {