biothings / discovery-app

The Data Discovery Engine project by the CD2H Data working-group
http://discovery.biothings.io
Apache License 2.0
4 stars 12 forks source link

Remove $validation for schemas that give warning y/y are missing validation #164

Closed gtsueng closed 2 years ago

gtsueng commented 2 years ago

Is your feature request related to a problem? Please describe. When using the DDE to make a Bioschemas type (no validation), the user will have to manually delete the $validation section.

Describe the solution you'd like When user is saving the jsonld to github, a warning will pop up that x/y properties are missing validation (to encourage the user to fix this problem). If the number of properties missing (x) = the number of properties total (y), then delete the $validation section altogether when exporting the json file.

Describe alternatives you've considered The manual deletion step is described for bioschemas users, but this seems like it should be a straightforward fix.

Additional context Bioschemas has two kinds of specifications that we have added to the DDE. The "type" lacks cardinality/marginality constraints and is in line with schema.org (therefore, should not have a $validation by default). The "profile" is a more constrained specification and needs the $validation.

gtsueng commented 2 years ago

remove validation toggle takes care of this