AllenNeuralDynamics / aind-data-schema-models

Data models used in aind-data-schema
MIT License
0 stars 1 forks source link

Control vocabulary for targeted structures #52

Closed saskiad closed 2 months ago

saskiad commented 1 year ago

Is your feature request related to a problem? Please describe. We need to control the vocabulary used to describe targeted structures - in multiple places.

Describe the solution you'd like I don't know how to do this elegantly - I'd like to use existing ontology. But I'm not sure how to do this without making a GIANT enum.

Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.

Additional context Add any other context or screenshots about the feature request here.

dyf commented 1 year ago

The ontology in question is here: https://api.brain-map.org/api/v2/data/Structure/query.json?criteria=[graph_id$eq1]&num_rows=1300

We could render that to a file, add it to the repository, and generate the Enum dynamically. I worry that it will blow up our schemas when rendered to JSONSchema because structure is everywhere. I will investigate a little more.

@jtyoung84 your thoughts here?

dyf commented 1 year ago

relevant discussion https://github.com/json-schema-org/community/discussions/142

dyf commented 1 year ago

and https://github.com/elixir-europe/BioHackathon/blob/master/interoperability/JSON%20schema%20validation%20with%20ontologies/README.md

jtyoung84 commented 1 year ago

Off the top of my head, I would generate the enum using a script and store the static enum in the code base. It looks like there are already discussions about the topic. I can look more deeply into it.

saskiad commented 1 year ago

@Sun-flow

saskiad commented 1 year ago

Could this help? https://github.com/SciCrunch/NIF-Ontology/tree/atlas