A Docusaurus plugin (v1.15.1, active development) that adds a JSON Schema viewer/editor React component to Docusaurus documentation sites. Supports JSON Schema drafts 07, 2019-09, and 2020-12. Integrates with Docusaurus 3.x, includes i18n support via `write-translations`, and ships TypeScript types. Differentiators include a human-friendly UI for schema exploration and ease of integration compared to custom solutions.
npm install docusaurus-json-schema-pluginNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Registers the JSON Schema plugin in a Docusaurus config, pointing to a local schema file.
Upgrade to Docusaurus >=3.10.1 or use the last v1.12.x version with Docusaurus v2.
Define schemas in docusaurus.config.js under the plugin options.
Add `enableEditor: false` (or `enableViewer: false`) to plugin options if not needed.
Use dynamic import or switch to ESM in your Docusaurus config (e.g., `module.exports = async () => {...}`).Run `npm install docusaurus-json-schema-plugin --save` in your Docusaurus project root.
Ensure you use the correct import: `const plugin = require('docusaurus-json-schema-plugin');` or `import plugin from 'docusaurus-json-schema-plugin';`.Define schemas as an array of objects, each with `id`, `label`, and `file` (or `url`).