Remove tag property from root object of core schemas
eslavich opened this issue · 1 comments
Our current use of tag prevents users from extending the core schemas. For example, say someone wants to extend our software-1.0.0
schema to include an additional optional release_date
property. It would be natural to implement like this:
id: http://example.com/schemas/extended_software-1.0.0
allOf:
- $ref: http://stsci.edu/schemas/asdf/core/software-1.0.0
- properties:
release_date:
type: string
But this doesn't work, because the tag
property enforces that the object's tag be software-1.0.0
, and the object that we validate with this schema will instead have tag extended_software-1.0.0
.
Does tag
serve a useful purpose in the root object of a schema? Schemas are matched to objects by tag in the first place, so it seems redundant to check the tag again during validation.
For the record, I had previously suggested removing tag from the metaschema altogether because I didn't understand its purpose as a validation directive. Now I'm suggesting that we remove it from the root object of the core schemas, but keep it in the metaschema for use cases like #268.