biothings / discovery-app

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

Metadata validator for validating resource metadata encoded in a page against a registered schema class #200

Open newgene opened 1 year ago

newgene commented 1 year ago

Is your feature request related to a problem? Please describe. A new feature allows validating resource metadata against a registered schema class (if JSON-schema definition exists)

Describe the solution you'd like A new UI interface like /metadata/validator allows users to validate a copy/pasted JSON metadata or a URL of a page (metadata JSON can then be extracted) against a selected schema class registered in DDE

Describe alternatives you've considered NA

Additional context Possible UI ideas from these relevant pages:

And we should consider creating a new backend API endpoint to handle the actual validation, that way it will display the consistent error messages from the metadata input form (the "metadata guide"). The validation functionality might have already existed in the biothings_schema Python package.

newgene commented 1 year ago

For the starting point, we can just allow copy/paste in a JSON object. Extracting from a given page at a URL can be added later, assuming there is a package for it already.

flaneuse commented 1 year ago

a potentially cool variation: does my schema match against any schema within the DDE? Related to the idea of having a discovery.biothings.io/translate to convert between schemas according to mapping schemas defined by @gtsueng