The fits-schema metaschema used for several (but not all) of the datamodel schemas does not check fits_hdu or fits_keyword if they are present in the top-most portion of the schema.
For example, the following schema will correctly fail a call to check_schema:
>>> asdf.schema.check_schema(schema)
ValidationError: ['invalid keyword'] is not of type 'string'
Failed validating 'type' in schema['allOf'][1]['properties']['fits_keyword']:
{'type': 'string'}
On instance['fits_keyword']:
['invalid keyword']
However if the fits_hdu (or fits_keyword) is nested in the schema the check_schema will incorrectly pass:
>>> asdf.schema.check_schema(schema) # passes with no ValidationError
All uses of fits_hdu and fits_keyword that I'm able to find in stdatamodels is of the second type (so the metaschema provides no validation for any of these parts of the schemas). Note that the fits_hdu and fits_keyword handling by stdatamodels (mapping model properties and fits data) is unaffected by this metaschema issue.
The
fits-schema
metaschema used for several (but not all) of the datamodel schemas does not checkfits_hdu
orfits_keyword
if they are present in the top-most portion of the schema.For example, the following schema will correctly fail a call to
check_schema
:However if the
fits_hdu
(orfits_keyword
) is nested in the schema thecheck_schema
will incorrectly pass:All uses of
fits_hdu
andfits_keyword
that I'm able to find instdatamodels
is of the second type (so the metaschema provides no validation for any of these parts of the schemas). Note that thefits_hdu
andfits_keyword
handling bystdatamodels
(mapping model properties and fits data) is unaffected by this metaschema issue.