Skip to content
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

Recognize inheritance patterns in json-schema to reconstruct class hierarchies #124

Open
cmungall opened this issue Jan 5, 2024 · 0 comments

Comments

@cmungall
Copy link
Member

cmungall commented Jan 5, 2024

JSON-Schema does not support inheritance, but some people employ boolean schema composition patterns to achieve analogous representations:

https://json-schema.org/blog/posts/modelling-inheritance

Another pattern is the allOf one employed by ODK: https://github.com/INCATools/ontology-development-kit/blob/master/schema/project-schema.json

It would be useful to be able to reconstruct class hierarchies. This would be optional, as this would be partly heuristic.

This is probably best conceived of as compositional:

  1. schemauto import-json-schema is concern with strict isomorphic conversion
  2. in the linkml core, we have schema transformations to reconstruct.
    • in fact we already support the reverse with logical_model_transformer which will "unwind" hierarchies into boolean schema compositions (which is deterministic, unlike the reverse)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant