-
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
[Feature request]: Integration with JSON-LD and BioSchemas #68
Comments
Regarding the validation of the properties, I found JSON-Paths mixed with URIs very handy to take advantage of Bioschemas having their validation definitions within GitHub. There is an error regarding Biovalidator compiling schemas with already existing For example, let's say we at the EGA want to allow for a
These may be solved were we to allow the interpretation of Following what I mentioned above, we could directly use them as follows: {
"schema": {
"$ref": "https://raw.githubusercontent.com/BioSchemas/specifications/master/Phenotype/jsonld/Phenotype_v0.2-DRAFT.json#/@graph[0]/$validation"
},
"data": { }
} The benefits of this are the common ones: fewer schemas for the same entities, increased interoperability and findability (due to Google rich results). But it may well not work 😅 |
Summary
Integration of JSON-LD syntax into the validation of a JSON document
Motivation
The idea would be to expand the interpretation of a JSON-LD document with its context so that it can be further validated following Schema.org and BioSchemas types and profiles.
This request is open for discussion, given that I'm not fully sure about the implications of interpreting JSON-LD as well as JSON Schema and if the benefits outweigh the changes.
Details
The way I envision this feature is by interpreting a JSON-LD document within its context of types and profiles. It could be done both by:
schema
has the condition of a BioSchemas/Schemas.org property (e.g.Person
), then Biovalidator would interpret it, fetch the BioSchemas/Schemas.org definition of that property and apply it during validation. For example, if the JSON looked like the following, Biovalidator would interpret that the schema to apply is the one defined by Schema.org for thePerson
type.data
has the condition of a BioSchemas/Schemas.org property (e.g.Person
), then Biovalidator would interpret it as such and apply it during validation. For example, if the JSON data looked like the following, Biovalidator would interpret that an extra layer to apply is the one defined by Schema.org for thePerson
type. If I am honest, I do not have trust in this approach, given that it would imply conditioning the data through the tool, rather than relying entirely on the schema for it.Use-cases
The text was updated successfully, but these errors were encountered: