Skip to content

feat: add Registry.display_as_tree() unicode tree output#355

Closed
ykd007 wants to merge 2 commits into
python-jsonschema:mainfrom
ykd007:feat/registry-unicode-tree
Closed

feat: add Registry.display_as_tree() unicode tree output#355
ykd007 wants to merge 2 commits into
python-jsonschema:mainfrom
ykd007:feat/registry-unicode-tree

Conversation

@ykd007
Copy link
Copy Markdown

@ykd007 ykd007 commented May 13, 2026

Adds a display_as_tree() method to Registry for debugging purposes, closes #17.

Resources are grouped by URI prefix and rendered using unicode box-drawing characters:

http://example.com/ – Resource(...)
├── foo/ – Resource(...)
│   ├── bar/ – Resource(...)
│   └── baz/ – Resource(...)
http://example.org/ – Resource(...)

The method crawls all registered resources before rendering so uncrawled subresources also appear.

Tests added in referencing/tests/test_core.py.

ykd007 and others added 2 commits May 13, 2026 20:12
Adds a display_as_tree() method to Registry for debugging.
Outputs resources as a unicode box-drawing tree grouped by
URI prefix, e.g.:

  http://example.com/ - Resource(...)
  ├── foo/ - Resource(...)
  │   └── bar/ - Resource(...)
  http://example.org/ - Resource(...)

Closes python-jsonschema#17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Give Registry a unicode tree output

2 participants