chore: improves documentation and readme

This commit is contained in:
2025-11-26 09:00:57 -03:00
parent b705a3a70b
commit beed4e5e97
3 changed files with 61 additions and 6 deletions

View File

@@ -10,6 +10,12 @@ and :py:meth:`SchemaConverter.build <jambo.SchemaConverter.build>`.
However, only :py:meth:`SchemaConverter.build_with_cache <jambo.SchemaConverter.build_with_cache>` exposes the cache through a supported API;
:py:meth:`SchemaConverter.build <jambo.SchemaConverter.build>` uses the cache internally and does not provide access to it.
The reference cache accepts a mutable mapping (typically a plain Python dict)
that maps reference names (strings) to generated Pydantic model classes.
Since only the reference names are stored it can cause name collisions if
multiple schemas with overlapping names are processed using the same cache.
Therefore, it's recommended that each namespace or schema source uses its own
:class:`SchemaConverter` instance.
-----------------------------------------
Configuring and Using the Reference Cache