Deep-normalise a JSON Schema object by applying a per-node transform
and recursing into every sub-schema location.
The optional visited set guards against shared object references and
cycles introduced upstream (e.g. by the OpenAPI bundler's
structuredClone-based inlining of external refs). The walk skips
already-seen nodes by returning the original reference rather than
recursing forever.
Deep-normalise a JSON Schema object by applying a per-node transform and recursing into every sub-schema location.
The optional
visitedset guards against shared object references and cycles introduced upstream (e.g. by the OpenAPI bundler'sstructuredClone-based inlining of external refs). The walk skips already-seen nodes by returning the original reference rather than recursing forever.