schema_dependencies#

lsst.images.serialization.schema_dependencies(tree_cls)#

Return every other schema whose content is inlined into tree_cls’s frozen document.

Parameters:

tree_cls (type[ArchiveTree]) – Serialization model class to inspect.

Returns:

Mapping from SCHEMA_NAME to the class declaring it, for every schema tree_cls depends on, directly or transitively. tree_cls’s own schema is never included, so a self-referential model reports nothing.

Return type:

dict [ str, type ]

Notes

Fields and base classes are both followed. An embedded model records its version in the document as a x-lsst-schema-url, but pydantic flattens an inherited model’s fields into the subclass and records nothing, so a base’s version cannot be recovered from the document it contributed to.

This page was last modified on .