-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Requested feature]: separate file with ontology and taxonomy rules #66
Comments
Hi Steffen, Thanks for reaching out. After Dublin, we were also thinking about bioschemas and how we can extend support. If I understood your use case correctly: "allof": [
{
"$ref": "https://schema.org/TYPE/JSON_SCHEMA_REPRESENTATION"
},
{
"type": "object",
..... secondary validation here
}
]
|
I just quickly glanced over the bioschemas dataset definition. I can see in |
Just a minor comment: JSON Schema keywords are case-sensitive, so it would be |
Hi,
And what I want to validate for the above could be:
Other examples for Yours, |
Hi, we are currently trying to conjure more examples, and we will prepare more validation rules. It would be great to have some biovalidator functionality to play with at the ELIXIR and ELIXIR-DE Biohackathons. |
Hi Steffen, I have given a try with This is an example that I have tried. {
"$id": "BioSchema/plus/customSchema/for/DefinedTerm",
"$schema": "https://json-schema.org/draft/2019-09/schema",
"description": "Use custom schema on top of BioSchema to validate BioSchema type",
"type": "object",
"$allOf": [
{
"$ref": "path/to/bioschemas/definedterm"
},
{
"description": "My custom schema for DefinedTerm",
"type": "object",
"properties": {
"termCode": {
"type": "string",
"isChildTermOf": {
"parentTerm": "http://purl.obolibrary.org/obo/CHMO_0000800",
"ontologyId": "chmo"
}
}
},
"required": [
"termCode"
]
}
]
}
|
Summary
The Extended keywords for ontology and taxonomy validation is a quite unique feature in this validator, and requires the
graphRestriction
,isChildTermOf
andisValidTaxonomy
in the test_schema.json file. If the JSON-LD schema definition is not under my control,I would like these semantic validations to be passed into biovalidator from a second file.
Motivation
I would like to allow better validation for schema.org and bioschemas metadata. Currently, there are types defined in JSON schema for e.g. https://schema.org/Dataset or https://bioschemas.org/profiles/MolecularEntity/0.5-RELEASE, which are developed in e.g. https://github.com/BioSchemas/specifications/tree/master/Dataset/ or https://github.com/BioSchemas/specifications/tree/master/MolecularEntity/.
These types allow various properties to have values as https://schema.org/DefinedTerm, and I'd expect the majority of these come from OBO ontologies you'd find on terminology services like OLS or NCBO.
However, I'd expect that schema.org wants to keep their types lean and won't allow people to add further validation into their schema definition. Also, for one schema type, there might be multiple profiles in different communities suggesting / requesting different restrictions on allowed ontology terms.
Example
An example would probably great, but I don't have one yet. I only found biovalidator at last weeks AllHands in Dublin :-)
Yours,
Steffen
The text was updated successfully, but these errors were encountered: