How to use the asdf.schema.validate function in asdf

To help you get started, we’ve selected a few asdf examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github spacetelescope / asdf / asdf / asdf.py View on Github external
def _validate(self, tree, custom=True, reading=False):
        tagged_tree = yamlutil.custom_tree_to_tagged_tree(
            tree, self)
        schema.validate(tagged_tree, self, reading=reading)
        # Perform secondary validation pass if requested
        if custom and self._custom_schema:
            schema.validate(tagged_tree, self, self._custom_schema,
                            reading=reading)
github spacetelescope / asdf / asdf / asdf.py View on Github external
def _validate(self, tree, custom=True, reading=False):
        tagged_tree = yamlutil.custom_tree_to_tagged_tree(
            tree, self)
        schema.validate(tagged_tree, self, reading=reading)
        # Perform secondary validation pass if requested
        if custom and self._custom_schema:
            schema.validate(tagged_tree, self, self._custom_schema,
                            reading=reading)