JSPM

  • Created
  • Published
  • Downloads 1347
  • Score
    100M100P100Q115036F
  • License AGPL-3.0-or-later

A Docusaurus v2 plugin that provides a JSON Schema viewer / editor React component !

Package Exports

  • docusaurus-json-schema-plugin
  • docusaurus-json-schema-plugin/lib/index.d.ts
  • docusaurus-json-schema-plugin/lib/index.d.ts.map
  • docusaurus-json-schema-plugin/lib/index.js
  • docusaurus-json-schema-plugin/lib/index.js.map
  • docusaurus-json-schema-plugin/lib/theme/JSONSchemaEditor/index.d.ts
  • docusaurus-json-schema-plugin/lib/theme/JSONSchemaEditor/index.d.ts.map
  • docusaurus-json-schema-plugin/lib/theme/JSONSchemaEditor/index.js
  • docusaurus-json-schema-plugin/lib/theme/JSONSchemaEditor/index.js.map
  • docusaurus-json-schema-plugin/lib/theme/JSONSchemaViewer/JSONSchemaElements/CreatePrimitive.d.ts
  • docusaurus-json-schema-plugin/lib/theme/JSONSchemaViewer/JSONSchemaElements/CreatePrimitive.d.ts.map
  • docusaurus-json-schema-plugin/lib/theme/JSONSchemaViewer/JSONSchemaElements/CreatePrimitive.js
  • docusaurus-json-schema-plugin/lib/theme/JSONSchemaViewer/JSONSchemaElements/CreatePrimitive.js.map
  • docusaurus-json-schema-plugin/lib/theme/JSONSchemaViewer/JSONSchemaElements/SchemaConditional/dependencies.d.ts
  • docusaurus-json-schema-plugin/lib/theme/JSONSchemaViewer/JSONSchemaElements/SchemaConditional/dependencies.d.ts.map
  • docusaurus-json-schema-plugin/lib/theme/JSONSchemaViewer/JSONSchemaElements/SchemaConditional/dependencies.js
  • docusaurus-json-schema-plugin/lib/theme/JSONSchemaViewer/JSONSchemaElements/SchemaConditional/dependencies.js.map
  • docusaurus-json-schema-plugin/lib/theme/JSONSchemaViewer/JSONSchemaElements/SchemaConditional/dependentRequired.d.ts
  • docusaurus-json-schema-plugin/lib/theme/JSONSchemaViewer/JSONSchemaElements/SchemaConditional/dependentRequired.d.ts.map
  • docusaurus-json-schema-plugin/lib/theme/JSONSchemaViewer/JSONSchemaElements/SchemaConditional/dependentRequired.js
  • docusaurus-json-schema-plugin/lib/theme/JSONSchemaViewer/JSONSchemaElements/SchemaConditional/dependentRequired.js.map
  • docusaurus-json-schema-plugin/lib/theme/JSONSchemaViewer/JSONSchemaElements/SchemaConditional/dependentSchemas.d.ts
  • docusaurus-json-schema-plugin/lib/theme/JSONSchemaViewer/JSONSchemaElements/SchemaConditional/dependentSchemas.d.ts.map
  • docusaurus-json-schema-plugin/lib/theme/JSONSchemaViewer/JSONSchemaElements/SchemaConditional/dependentSchemas.js
  • docusaurus-json-schema-plugin/lib/theme/JSONSchemaViewer/JSONSchemaElements/SchemaConditional/dependentSchemas.js.map
  • docusaurus-json-schema-plugin/lib/theme/JSONSchemaViewer/JSONSchemaElements/SchemaConditional/if-else-then.d.ts
  • docusaurus-json-schema-plugin/lib/theme/JSONSchemaViewer/JSONSchemaElements/SchemaConditional/if-else-then.d.ts.map
  • docusaurus-json-schema-plugin/lib/theme/JSONSchemaViewer/JSONSchemaElements/SchemaConditional/if-else-then.js
  • docusaurus-json-schema-plugin/lib/theme/JSONSchemaViewer/JSONSchemaElements/SchemaConditional/if-else-then.js.map
  • docusaurus-json-schema-plugin/lib/theme/JSONSchemaViewer/JSONSchemaElements/SchemaConditional/index.d.ts
  • docusaurus-json-schema-plugin/lib/theme/JSONSchemaViewer/JSONSchemaElements/SchemaConditional/index.d.ts.map
  • docusaurus-json-schema-plugin/lib/theme/JSONSchemaViewer/JSONSchemaElements/SchemaConditional/index.js
  • docusaurus-json-schema-plugin/lib/theme/JSONSchemaViewer/JSONSchemaElements/SchemaConditional/index.js.map
  • docusaurus-json-schema-plugin/lib/theme/JSONSchemaViewer/JSONSchemaElements/SchemaConditional/schemaConditional.d.ts
  • docusaurus-json-schema-plugin/lib/theme/JSONSchemaViewer/JSONSchemaElements/SchemaConditional/schemaConditional.d.ts.map
  • docusaurus-json-schema-plugin/lib/theme/JSONSchemaViewer/JSONSchemaElements/SchemaConditional/schemaConditional.js
  • docusaurus-json-schema-plugin/lib/theme/JSONSchemaViewer/JSONSchemaElements/SchemaConditional/schemaConditional.js.map
  • docusaurus-json-schema-plugin/lib/theme/JSONSchemaViewer/JSONSchemaElements/array/Contains.d.ts
  • docusaurus-json-schema-plugin/lib/theme/JSONSchemaViewer/JSONSchemaElements/array/Contains.d.ts.map
  • docusaurus-json-schema-plugin/lib/theme/JSONSchemaViewer/JSONSchemaElements/array/Contains.js
  • docusaurus-json-schema-plugin/lib/theme/JSONSchemaViewer/JSONSchemaElements/array/Contains.js.map
  • docusaurus-json-schema-plugin/lib/theme/JSONSchemaViewer/JSONSchemaElements/array/CreateArray.d.ts
  • docusaurus-json-schema-plugin/lib/theme/JSONSchemaViewer/JSONSchemaElements/array/CreateArray.d.ts.map
  • docusaurus-json-schema-plugin/lib/theme/JSONSchemaViewer/JSONSchemaElements/array/CreateArray.js
  • docusaurus-json-schema-plugin/lib/theme/JSONSchemaViewer/JSONSchemaElements/array/CreateArray.js.map
  • docusaurus-json-schema-plugin/lib/theme/JSONSchemaViewer/JSONSchemaElements/array/Items.d.ts
  • docusaurus-json-schema-plugin/lib/theme/JSONSchemaViewer/JSONSchemaElements/array/Items.d.ts.map
  • docusaurus-json-schema-plugin/lib/theme/JSONSchemaViewer/JSONSchemaElements/array/Items.js
  • docusaurus-json-schema-plugin/lib/theme/JSONSchemaViewer/JSONSchemaElements/array/Items.js.map
  • docusaurus-json-schema-plugin/lib/theme/JSONSchemaViewer/JSONSchemaElements/array/PrefixItems.d.ts
  • docusaurus-json-schema-plugin/lib/theme/JSONSchemaViewer/JSONSchemaElements/array/PrefixItems.d.ts.map
  • docusaurus-json-schema-plugin/lib/theme/JSONSchemaViewer/JSONSchemaElements/array/PrefixItems.js
  • docusaurus-json-schema-plugin/lib/theme/JSONSchemaViewer/JSONSchemaElements/array/PrefixItems.js.map
  • docusaurus-json-schema-plugin/lib/theme/JSONSchemaViewer/JSONSchemaElements/array/index.d.ts
  • docusaurus-json-schema-plugin/lib/theme/JSONSchemaViewer/JSONSchemaElements/array/index.d.ts.map
  • docusaurus-json-schema-plugin/lib/theme/JSONSchemaViewer/JSONSchemaElements/array/index.js
  • docusaurus-json-schema-plugin/lib/theme/JSONSchemaViewer/JSONSchemaElements/array/index.js.map
  • docusaurus-json-schema-plugin/lib/theme/JSONSchemaViewer/JSONSchemaElements/index.d.ts
  • docusaurus-json-schema-plugin/lib/theme/JSONSchemaViewer/JSONSchemaElements/index.d.ts.map
  • docusaurus-json-schema-plugin/lib/theme/JSONSchemaViewer/JSONSchemaElements/index.js
  • docusaurus-json-schema-plugin/lib/theme/JSONSchemaViewer/JSONSchemaElements/index.js.map
  • docusaurus-json-schema-plugin/lib/theme/JSONSchemaViewer/JSONSchemaElements/object/AdditionalProperties.d.ts
  • docusaurus-json-schema-plugin/lib/theme/JSONSchemaViewer/JSONSchemaElements/object/AdditionalProperties.d.ts.map
  • docusaurus-json-schema-plugin/lib/theme/JSONSchemaViewer/JSONSchemaElements/object/AdditionalProperties.js
  • docusaurus-json-schema-plugin/lib/theme/JSONSchemaViewer/JSONSchemaElements/object/AdditionalProperties.js.map
  • docusaurus-json-schema-plugin/lib/theme/JSONSchemaViewer/JSONSchemaElements/object/CreateObject.d.ts
  • docusaurus-json-schema-plugin/lib/theme/JSONSchemaViewer/JSONSchemaElements/object/CreateObject.d.ts.map
  • docusaurus-json-schema-plugin/lib/theme/JSONSchemaViewer/JSONSchemaElements/object/CreateObject.js
  • docusaurus-json-schema-plugin/lib/theme/JSONSchemaViewer/JSONSchemaElements/object/CreateObject.js.map
  • docusaurus-json-schema-plugin/lib/theme/JSONSchemaViewer/JSONSchemaElements/object/PatternProperties.d.ts
  • docusaurus-json-schema-plugin/lib/theme/JSONSchemaViewer/JSONSchemaElements/object/PatternProperties.d.ts.map
  • docusaurus-json-schema-plugin/lib/theme/JSONSchemaViewer/JSONSchemaElements/object/PatternProperties.js
  • docusaurus-json-schema-plugin/lib/theme/JSONSchemaViewer/JSONSchemaElements/object/PatternProperties.js.map
  • docusaurus-json-schema-plugin/lib/theme/JSONSchemaViewer/JSONSchemaElements/object/Properties.d.ts
  • docusaurus-json-schema-plugin/lib/theme/JSONSchemaViewer/JSONSchemaElements/object/Properties.d.ts.map
  • docusaurus-json-schema-plugin/lib/theme/JSONSchemaViewer/JSONSchemaElements/object/Properties.js
  • docusaurus-json-schema-plugin/lib/theme/JSONSchemaViewer/JSONSchemaElements/object/Properties.js.map
  • docusaurus-json-schema-plugin/lib/theme/JSONSchemaViewer/JSONSchemaElements/object/PropertyNames.d.ts
  • docusaurus-json-schema-plugin/lib/theme/JSONSchemaViewer/JSONSchemaElements/object/PropertyNames.d.ts.map
  • docusaurus-json-schema-plugin/lib/theme/JSONSchemaViewer/JSONSchemaElements/object/PropertyNames.js
  • docusaurus-json-schema-plugin/lib/theme/JSONSchemaViewer/JSONSchemaElements/object/PropertyNames.js.map
  • docusaurus-json-schema-plugin/lib/theme/JSONSchemaViewer/JSONSchemaElements/object/index.d.ts
  • docusaurus-json-schema-plugin/lib/theme/JSONSchemaViewer/JSONSchemaElements/object/index.d.ts.map
  • docusaurus-json-schema-plugin/lib/theme/JSONSchemaViewer/JSONSchemaElements/object/index.js
  • docusaurus-json-schema-plugin/lib/theme/JSONSchemaViewer/JSONSchemaElements/object/index.js.map
  • docusaurus-json-schema-plugin/lib/theme/JSONSchemaViewer/JSONSchemaElements/schemaComposition/allOfSchema.d.ts
  • docusaurus-json-schema-plugin/lib/theme/JSONSchemaViewer/JSONSchemaElements/schemaComposition/allOfSchema.d.ts.map
  • docusaurus-json-schema-plugin/lib/theme/JSONSchemaViewer/JSONSchemaElements/schemaComposition/allOfSchema.js
  • docusaurus-json-schema-plugin/lib/theme/JSONSchemaViewer/JSONSchemaElements/schemaComposition/allOfSchema.js.map
  • docusaurus-json-schema-plugin/lib/theme/JSONSchemaViewer/JSONSchemaElements/schemaComposition/anyOfSchema.d.ts
  • docusaurus-json-schema-plugin/lib/theme/JSONSchemaViewer/JSONSchemaElements/schemaComposition/anyOfSchema.d.ts.map
  • docusaurus-json-schema-plugin/lib/theme/JSONSchemaViewer/JSONSchemaElements/schemaComposition/anyOfSchema.js
  • docusaurus-json-schema-plugin/lib/theme/JSONSchemaViewer/JSONSchemaElements/schemaComposition/anyOfSchema.js.map
  • docusaurus-json-schema-plugin/lib/theme/JSONSchemaViewer/JSONSchemaElements/schemaComposition/index.d.ts
  • docusaurus-json-schema-plugin/lib/theme/JSONSchemaViewer/JSONSchemaElements/schemaComposition/index.d.ts.map
  • docusaurus-json-schema-plugin/lib/theme/JSONSchemaViewer/JSONSchemaElements/schemaComposition/index.js
  • docusaurus-json-schema-plugin/lib/theme/JSONSchemaViewer/JSONSchemaElements/schemaComposition/index.js.map
  • docusaurus-json-schema-plugin/lib/theme/JSONSchemaViewer/JSONSchemaElements/schemaComposition/notSchema.d.ts
  • docusaurus-json-schema-plugin/lib/theme/JSONSchemaViewer/JSONSchemaElements/schemaComposition/notSchema.d.ts.map
  • docusaurus-json-schema-plugin/lib/theme/JSONSchemaViewer/JSONSchemaElements/schemaComposition/notSchema.js
  • docusaurus-json-schema-plugin/lib/theme/JSONSchemaViewer/JSONSchemaElements/schemaComposition/notSchema.js.map
  • docusaurus-json-schema-plugin/lib/theme/JSONSchemaViewer/JSONSchemaElements/schemaComposition/oneOfSchema.d.ts
  • docusaurus-json-schema-plugin/lib/theme/JSONSchemaViewer/JSONSchemaElements/schemaComposition/oneOfSchema.d.ts.map
  • docusaurus-json-schema-plugin/lib/theme/JSONSchemaViewer/JSONSchemaElements/schemaComposition/oneOfSchema.js
  • docusaurus-json-schema-plugin/lib/theme/JSONSchemaViewer/JSONSchemaElements/schemaComposition/oneOfSchema.js.map
  • docusaurus-json-schema-plugin/lib/theme/JSONSchemaViewer/JSONSchemaElements/schemaComposition/schemaComposition.d.ts
  • docusaurus-json-schema-plugin/lib/theme/JSONSchemaViewer/JSONSchemaElements/schemaComposition/schemaComposition.d.ts.map
  • docusaurus-json-schema-plugin/lib/theme/JSONSchemaViewer/JSONSchemaElements/schemaComposition/schemaComposition.js
  • docusaurus-json-schema-plugin/lib/theme/JSONSchemaViewer/JSONSchemaElements/schemaComposition/schemaComposition.js.map
  • docusaurus-json-schema-plugin/lib/theme/JSONSchemaViewer/components/Collapsible.d.ts
  • docusaurus-json-schema-plugin/lib/theme/JSONSchemaViewer/components/Collapsible.d.ts.map
  • docusaurus-json-schema-plugin/lib/theme/JSONSchemaViewer/components/Collapsible.js
  • docusaurus-json-schema-plugin/lib/theme/JSONSchemaViewer/components/Collapsible.js.map
  • docusaurus-json-schema-plugin/lib/theme/JSONSchemaViewer/components/CreateEdge.d.ts
  • docusaurus-json-schema-plugin/lib/theme/JSONSchemaViewer/components/CreateEdge.d.ts.map
  • docusaurus-json-schema-plugin/lib/theme/JSONSchemaViewer/components/CreateEdge.js
  • docusaurus-json-schema-plugin/lib/theme/JSONSchemaViewer/components/CreateEdge.js.map
  • docusaurus-json-schema-plugin/lib/theme/JSONSchemaViewer/components/CreateNodes.d.ts
  • docusaurus-json-schema-plugin/lib/theme/JSONSchemaViewer/components/CreateNodes.d.ts.map
  • docusaurus-json-schema-plugin/lib/theme/JSONSchemaViewer/components/CreateNodes.js
  • docusaurus-json-schema-plugin/lib/theme/JSONSchemaViewer/components/CreateNodes.js.map
  • docusaurus-json-schema-plugin/lib/theme/JSONSchemaViewer/components/SchemaItem/SchemaItem.d.ts
  • docusaurus-json-schema-plugin/lib/theme/JSONSchemaViewer/components/SchemaItem/SchemaItem.d.ts.map
  • docusaurus-json-schema-plugin/lib/theme/JSONSchemaViewer/components/SchemaItem/SchemaItem.js
  • docusaurus-json-schema-plugin/lib/theme/JSONSchemaViewer/components/SchemaItem/SchemaItem.js.map
  • docusaurus-json-schema-plugin/lib/theme/JSONSchemaViewer/components/SchemaItem/styles.module.css
  • docusaurus-json-schema-plugin/lib/theme/JSONSchemaViewer/components/index.d.ts
  • docusaurus-json-schema-plugin/lib/theme/JSONSchemaViewer/components/index.d.ts.map
  • docusaurus-json-schema-plugin/lib/theme/JSONSchemaViewer/components/index.js
  • docusaurus-json-schema-plugin/lib/theme/JSONSchemaViewer/components/index.js.map
  • docusaurus-json-schema-plugin/lib/theme/JSONSchemaViewer/index.d.ts
  • docusaurus-json-schema-plugin/lib/theme/JSONSchemaViewer/index.d.ts.map
  • docusaurus-json-schema-plugin/lib/theme/JSONSchemaViewer/index.js
  • docusaurus-json-schema-plugin/lib/theme/JSONSchemaViewer/index.js.map
  • docusaurus-json-schema-plugin/lib/theme/JSONSchemaViewer/utils/detectTypes.d.ts
  • docusaurus-json-schema-plugin/lib/theme/JSONSchemaViewer/utils/detectTypes.d.ts.map
  • docusaurus-json-schema-plugin/lib/theme/JSONSchemaViewer/utils/detectTypes.js
  • docusaurus-json-schema-plugin/lib/theme/JSONSchemaViewer/utils/detectTypes.js.map
  • docusaurus-json-schema-plugin/lib/theme/JSONSchemaViewer/utils/generateFriendlyName.d.ts
  • docusaurus-json-schema-plugin/lib/theme/JSONSchemaViewer/utils/generateFriendlyName.d.ts.map
  • docusaurus-json-schema-plugin/lib/theme/JSONSchemaViewer/utils/generateFriendlyName.js
  • docusaurus-json-schema-plugin/lib/theme/JSONSchemaViewer/utils/generateFriendlyName.js.map
  • docusaurus-json-schema-plugin/lib/theme/JSONSchemaViewer/utils/getQualifierMessages.d.ts
  • docusaurus-json-schema-plugin/lib/theme/JSONSchemaViewer/utils/getQualifierMessages.d.ts.map
  • docusaurus-json-schema-plugin/lib/theme/JSONSchemaViewer/utils/getQualifierMessages.js
  • docusaurus-json-schema-plugin/lib/theme/JSONSchemaViewer/utils/getQualifierMessages.js.map
  • docusaurus-json-schema-plugin/lib/theme/JSONSchemaViewer/utils/index.d.ts
  • docusaurus-json-schema-plugin/lib/theme/JSONSchemaViewer/utils/index.d.ts.map
  • docusaurus-json-schema-plugin/lib/theme/JSONSchemaViewer/utils/index.js
  • docusaurus-json-schema-plugin/lib/theme/JSONSchemaViewer/utils/index.js.map
  • docusaurus-json-schema-plugin/lib/tsconfig.tsbuildinfo
  • docusaurus-json-schema-plugin/src/index.ts
  • docusaurus-json-schema-plugin/src/theme-json-schema.d.ts
  • docusaurus-json-schema-plugin/src/theme/JSONSchemaEditor/index.tsx
  • docusaurus-json-schema-plugin/src/theme/JSONSchemaViewer/JSONSchemaElements/CreatePrimitive.tsx
  • docusaurus-json-schema-plugin/src/theme/JSONSchemaViewer/JSONSchemaElements/SchemaConditional/dependencies.tsx
  • docusaurus-json-schema-plugin/src/theme/JSONSchemaViewer/JSONSchemaElements/SchemaConditional/dependentRequired.tsx
  • docusaurus-json-schema-plugin/src/theme/JSONSchemaViewer/JSONSchemaElements/SchemaConditional/dependentSchemas.tsx
  • docusaurus-json-schema-plugin/src/theme/JSONSchemaViewer/JSONSchemaElements/SchemaConditional/if-else-then.tsx
  • docusaurus-json-schema-plugin/src/theme/JSONSchemaViewer/JSONSchemaElements/SchemaConditional/index.ts
  • docusaurus-json-schema-plugin/src/theme/JSONSchemaViewer/JSONSchemaElements/SchemaConditional/schemaConditional.tsx
  • docusaurus-json-schema-plugin/src/theme/JSONSchemaViewer/JSONSchemaElements/array/Contains.tsx
  • docusaurus-json-schema-plugin/src/theme/JSONSchemaViewer/JSONSchemaElements/array/CreateArray.tsx
  • docusaurus-json-schema-plugin/src/theme/JSONSchemaViewer/JSONSchemaElements/array/Items.tsx
  • docusaurus-json-schema-plugin/src/theme/JSONSchemaViewer/JSONSchemaElements/array/PrefixItems.tsx
  • docusaurus-json-schema-plugin/src/theme/JSONSchemaViewer/JSONSchemaElements/array/index.tsx
  • docusaurus-json-schema-plugin/src/theme/JSONSchemaViewer/JSONSchemaElements/index.tsx
  • docusaurus-json-schema-plugin/src/theme/JSONSchemaViewer/JSONSchemaElements/object/AdditionalProperties.tsx
  • docusaurus-json-schema-plugin/src/theme/JSONSchemaViewer/JSONSchemaElements/object/CreateObject.tsx
  • docusaurus-json-schema-plugin/src/theme/JSONSchemaViewer/JSONSchemaElements/object/PatternProperties.tsx
  • docusaurus-json-schema-plugin/src/theme/JSONSchemaViewer/JSONSchemaElements/object/Properties.tsx
  • docusaurus-json-schema-plugin/src/theme/JSONSchemaViewer/JSONSchemaElements/object/PropertyNames.tsx
  • docusaurus-json-schema-plugin/src/theme/JSONSchemaViewer/JSONSchemaElements/object/index.ts
  • docusaurus-json-schema-plugin/src/theme/JSONSchemaViewer/JSONSchemaElements/schemaComposition/allOfSchema.tsx
  • docusaurus-json-schema-plugin/src/theme/JSONSchemaViewer/JSONSchemaElements/schemaComposition/anyOfSchema.tsx
  • docusaurus-json-schema-plugin/src/theme/JSONSchemaViewer/JSONSchemaElements/schemaComposition/index.ts
  • docusaurus-json-schema-plugin/src/theme/JSONSchemaViewer/JSONSchemaElements/schemaComposition/notSchema.tsx
  • docusaurus-json-schema-plugin/src/theme/JSONSchemaViewer/JSONSchemaElements/schemaComposition/oneOfSchema.tsx
  • docusaurus-json-schema-plugin/src/theme/JSONSchemaViewer/JSONSchemaElements/schemaComposition/schemaComposition.tsx
  • docusaurus-json-schema-plugin/src/theme/JSONSchemaViewer/components/Collapsible.tsx
  • docusaurus-json-schema-plugin/src/theme/JSONSchemaViewer/components/CreateEdge.tsx
  • docusaurus-json-schema-plugin/src/theme/JSONSchemaViewer/components/CreateNodes.tsx
  • docusaurus-json-schema-plugin/src/theme/JSONSchemaViewer/components/SchemaItem/SchemaItem.tsx
  • docusaurus-json-schema-plugin/src/theme/JSONSchemaViewer/components/SchemaItem/styles.module.css
  • docusaurus-json-schema-plugin/src/theme/JSONSchemaViewer/components/index.ts
  • docusaurus-json-schema-plugin/src/theme/JSONSchemaViewer/index.tsx
  • docusaurus-json-schema-plugin/src/theme/JSONSchemaViewer/types.d.ts
  • docusaurus-json-schema-plugin/src/theme/JSONSchemaViewer/utils/detectTypes.ts
  • docusaurus-json-schema-plugin/src/theme/JSONSchemaViewer/utils/generateFriendlyName.ts
  • docusaurus-json-schema-plugin/src/theme/JSONSchemaViewer/utils/getQualifierMessages.tsx
  • docusaurus-json-schema-plugin/src/theme/JSONSchemaViewer/utils/index.tsx

Readme

Docusaurus JSON Schema Plugin

JSON Schema viewer / editor in Docusaurus v2.



License: AGPL v3 [npm latest package] [npm downloads] Codacy Badge PRs Welcome prettier Buy Me A Coffee


Overview

Key Features:

  • Compatible: Works with JSON Schema Draft-07 / Draft 2019-09 / Draft 2020-12
  • Human-friendly Make exploration of specs a delightful experience
  • Internationalization Extend to your own language , thanks to docusaurus write-translations
  • Easy to integrate Components are ready to use, as built on top of Docusaurus

Installation

npm install docusaurus-json-schema-plugin --prefer-dedupe

⚠️ Why --prefer-dedupe ? Because of Invalid Hook Call Warning common issue in projets

Configuring docusaurus.config.js

// docusaurus.config.js

{
    themes: ["docusaurus-json-schema-plugin"], // Allows use of @theme/JSONSchemaEditor or @theme/JSONSchemaViewer
}

Usage

JSONSchemaViewer

Component to display a JSON Schema in a human friendly way

API

Property Type Required Note
schema JSONSchema Mandatory JSON Schema Draft-07 / Draft 2019-09 / Draft 2020-12
resolverOptions IResolverOpts Optional To resolve your $ref (by default, only inline references will be dereferenced). More info on @stoplight/json-ref-resolver

Example

import React from "react"
import Layout from "@theme/Layout"
import JSONSchemaViewer from "@theme/JSONSchemaViewer"

function ExamplePage(): JSX.Element {

  // You are free to fetch your schema in your own way (load local file, fetch, ...) :)
  const mySchema = {
    "type": "object",
    "properties": {
      "builtin": {
        "type": "number"
      }
    },
    "patternProperties": {
      "^S_": {
        "type": "string"
      },
      "^I_": {
        "type": "integer"
      }
    },
    "additionalProperties": {
      "type": "string"
    }
  }

  return (
    <Layout
      title={`My super JSON Schema`}
      description="Description will go into a meta tag in <head />"
    >
      <JSONSchemaViewer schema={mySchema} />
    </Layout>
  )
}

JSONSchemaEditor

Component to learn within a editor with autocomplete, validation, ...

API

Property Type Required Note
schema JSONSchema Mandatory JSON Schema supported by monaco-editor, which powers VS Code - Currently, it supports all draft versions from Draft 4 to JSON Schema Draft 2020-12
.... MonacoEditorProps Optional Properties of react-monaco-editor

Example

import React from "react"
import Layout from "@theme/Layout"
import JSONSchemaEditor from "@theme/JSONSchemaEditor"
// import { useColorMode } from "@docusaurus/theme-common"

function ExamplePage(): JSX.Element {

  // You are free to fetch your schema in your own way (load local file, fetch, ...) :)
  const mySchema = {
    "type": "object",
    "properties": {
      "builtin": {
        "type": "number"
      }
    },
    "patternProperties": {
      "^S_": {
        "type": "string"
      },
      "^I_": {
        "type": "integer"
      }
    },
    "additionalProperties": {
      "type": "string"
    }
  }

  // https://docusaurus.io/docs/api/themes/configuration#use-color-mode
  return (
    <Layout
      title={`My super JSON Schema`}
      description="Description will go into a meta tag in <head />"
    >
      {/* You can "useColorMode" if you want to take into account current Docusaurus color */}
      <JSONSchemaEditor schema={mySchema} theme={"vs-dark"} />
    </Layout>
  )
}

Swizzling components

npm run swizzle docusaurus-json-schema-plugin [component name]

Unsupported JSON Schema features in JSONSchemaViewer

As you might have guessed, supporting several versions is a challenging topic.
A few selected keywords are unsupported for the time being :

Specification keyword Reason
2019-09 unevaluatedItems Hard to understand for most people
2019-09 unevaluatedProperties Hard to understand for most people

If you wish to see them covered, consider to contribute to the project ;)

Credits

Special thanks to @PaloAltoNetworks (Palo Alto Networks), the author of docusaurus-openapi-docs, which this project took some inspirations as a starting base.

Contributors