Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
AIT
biovalidator
Commits
fc11375d
Commit
fc11375d
authored
Jul 27, 2021
by
Isuru Liyanage
Browse files
add graph_restriction custom keyword to bio-validator
parent
ed81d9ff
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
2 deletions
+4
-2
examples/schemas/graphRestriction-schema.json
examples/schemas/graphRestriction-schema.json
+1
-1
src/validator.js
src/validator.js
+3
-1
validator-cli.js
validator-cli.js
+0
-0
No files found.
examples/schemas/graphRestriction-schema.json
View file @
fc11375d
...
...
@@ -40,4 +40,4 @@
}
},
"type"
:
"object"
}
\ No newline at end of file
}
src/validator.js
View file @
fc11375d
...
...
@@ -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
)
{
...
...
validator-cli.js
100644 → 100755
View file @
fc11375d
File mode changed from 100644 to 100755
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment