Skip to content

A JavaScript tool to visualize JSON Schema as HTML Table

License

Notifications You must be signed in to change notification settings

OpenEthicsAI/Schable

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Schable

Schable: Schema into Table

A JavaScript tool to visualize JSON Schema as HTML Table.

To test, install node.js if not yet installed, navigate to the repo folder and launch server.js.

  1. Add JS and CSS in the header
<link href="/src/css/schable.css" rel="stylesheet" >
<script src="/src/js/schable.js"></script>
  1. Call schable(), specifying the div class. Set proxy = true when using on localhost.
<script>
    const jsonSchemaUrl = "https://openethics.ai/schema/oedp/oedp.passport.schema.json";
    schable(jsonSchemaUrl, ".oedp", captions = true, proxy = false, max_depth = 12);
</script>
<div class="oedp"></div>