You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
some thoughts and ideas regarding implementations of custom ASDF validators
handling $ref
any validation keywords that are on the level of a $ref: statement seem to be dropped (validation does not get triggerd)
example:
properties:
length_prop:
$ref: tag:stsci.edu:asdf/unit/quantity-1.1.0wx_unit: "s"# this does not trigger a validator on wx_unitwx_unit:
length_prop: "m"# this works as expected
type: objectproperties:
quantity_prop:
description: | a simple quantity with custom validatortag: tag:stsci.edu:asdf/unit/quantity-1.1.0wx_unit: "s"
registering validators
apparently registering a validator for one class might enable the validator on a global extension level. This might be useful but we should check "overriding" validator keywords with different functions for seperate classes.
UPDATE: this was fixed by defining better (tighter) restrictions on anyOf subtypes (i.e. well defined required with additionalProperties: false)
Use of oneOf is encouraged once asdf-format/asdf#811 is available (see asdf-format/asdf#809)
The text was updated successfully, but these errors were encountered:
some thoughts and ideas regarding implementations of custom ASDF validators
handling $ref
any validation keywords that are on the level of a $ref: statement seem to be dropped (validation does not get triggerd)
example:
See asdf-format/asdf#814 for details and workaround using
tag
validatorregistering validators
apparently registering a validator for one class might enable the validator on a global extension level. This might be useful but we should check "overriding" validator keywords with different functions for seperate classes.
See asdf-format/asdf#815 (comment) for explanation of current implementation
handling
anyOf
/oneOf
UPDATE: this was fixed by defining better (tighter) restrictions on
anyOf
subtypes (i.e. well definedrequired
withadditionalProperties: false
)Use of
oneOf
is encouraged once asdf-format/asdf#811 is available (see asdf-format/asdf#809)The text was updated successfully, but these errors were encountered: