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

ASDF metaschema and inheritance #189

Open
drdavella opened this issue Jan 7, 2019 · 1 comment
Open

ASDF metaschema and inheritance #189

drdavella opened this issue Jan 7, 2019 · 1 comment

Comments

@drdavella
Copy link
Contributor

JSON Schema has no concept of inheritance. This makes it difficult to write schemas for type hierarchies, which have been pretty common in the ASDF use cases we've seen so far. The result ends up being a lot of duplicated attributes throughout the schema hierarchy, which becomes quite difficult to maintain.

I've recently been wondering whether we could incorporate some way to express inheritance and type hierarchies into the existing ASDF metaschema. This wouldn't actually be a part of the JSON Schema validation, but instead would indicate some preprocessing steps that would be taken when parsing schemas before they were used for validation.

This seems like a pretty proposal, but I haven't thought through many of the details yet of how exactly it would be expressed in the schema.

It would be important to allow for the ability to override the definition of certain fields inherited from a parent in a child schema.

cc-ing @jdavies-st since this could potentially replace a lot of custom logic in JWST data models.

@jdavies-st
Copy link
Contributor

Sounds very interesting! I'm keen. cc-ing @nden too, as she's looked at this issue more closely than I.

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

2 participants