Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Pretty Print JSON Schema #536

Open
ryancormack opened this issue Jul 5, 2024 · 1 comment
Open

Bug: Pretty Print JSON Schema #536

ryancormack opened this issue Jul 5, 2024 · 1 comment
Labels
bug Something isn't working enhancement New feature or request

Comments

@ryancormack
Copy link
Contributor

Summary

When using the component, the raw JSON Schema string is printed to the page. In v1, JSON Schema was rendered in a way that allowed you to view/collapse part of the tree and get visually see type information etc.
image

Desired Outcome

JSON Schema is pretty printed to the screen, with the ability to expand and collapse nodes, allowing people to quickly/easily see the schema rather than having to humanly parse the JSON Schema document to understand the file.

Additional information

When a JSON Schema file is inlined, the text is rendered in a single, horizontally scrollable, line. This causes problems when schemas are programmatically generated and don't have line breaks. This can compound this particular issue.

@boyney123 boyney123 added bug Something isn't working enhancement New feature or request labels Jul 5, 2024
@kernwig
Copy link

kernwig commented Sep 17, 2024

As somewhat of a visual workaround, I placed it in an accordion:

<Accordion title="View raw JSON schema"><Schema file="schema.json"/></Accordion>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants