A JSON Schema viewer React component
- Full JSON Schema Draft 4 support, including
oneOf
andanyOf
combiner properties - Renders complicated nested objects to any depth
- Renders validation properties and markdown descriptions
- Capable of linking resolved $refs
- Theme-able
- Collapsible
Supported in modern browsers and node.
# latest stable
yarn add @stoplight/json-schema-viewer
import { JsonSchemaViewer, ThemeProvider } from "@stoplight/json-schema-viewer";
import { dark } from "@stoplight/json-schema-viewer/themes";
<ThemeProvider theme={dark}>
<JsonSchemaViewer dereferencedSchema={dereferencedSchema} schema={schema} />
</ThemeProvider>
More examples can be find in the Storybook stories.
- Clone repo.
- Create / checkout
feature/{name}
,chore/{name}
, orfix/{name}
branch. - Install deps:
yarn
. - Make your changes.
- Run tests:
yarn test.prod
. - Stage relevant files to git.
- Commit:
yarn commit
. NOTE: Commits that don't follow the conventional format will be rejected.yarn commit
creates this format for you, or you can put it together manually and then do a regulargit commit
. - Push:
git push
. - Open PR targeting the
develop
branch.