Skip to main content

❓ FAQ

Frequently asked questions

How can I contribute ?

Any contribution is welcome! Read more here.

How to swizzling components ?
npm run swizzle docusaurus-json-schema-plugin [component name] -- --typescript

For extra information, please consult Docusaurus Swizzling documentation

Why do I get Loading ... using JSONSchemaViewer ?

Several reasons, most likely :

  1. You have an error not related to docusaurus-json-schema-plugin in your codebase like this one : missing language(s) in prism config / ...
  2. You broke the rules of hooks or one of your dependancies did
  3. You have more than one copy of React in the same app or mismatching versions of React and React DOM

If none of these helped you, consider to have a reproducible example before asking help to Docusaurus / React

I have multiple definitions in my JSON Schema file. How can I select only one for JSONSchemaViewer ?

Specify jsonPointer option with a valid JSON Pointer (e.g. #/definitions/user).
An example is available in the documentation.
The mechanism is domain agnostic and will work regardless of your cases (OpenAPI, ...)

How to translate labels into my own language ?

Please refer for extra information to :

Which features of JSON Schema are not supported yet ?

It is explained on the Roadmap page

Why the minimal JSON Schema version is Draft-07 ?

Several reasons :

  • Many actors (like ajv ) acknowledge that it is most widely used version of JSON Schema specification
  • Many tools don't care anymore for older versions such as Draft-04
  • It fits my needs when I designed this project
tip

You can migrate schemas from draft-04 to draft-07 using ajv-cli

How to support specifications that extends the one of JSON Schema (such as OpenAPI, MongoDB, ... )

That is a good question as many extensions exist in the wild :

In the case of OpenAPI, since OpenAPI 3.1+ , they are now valid Draft 2020-12 JSON Schema so compatible with this lib.

For the time being, it is low priority as several aspects needs to be considered that might lead to issues , breaking changes, ...

In the meantime, feel free to share your feedback on Github discussions

Compatibility Matrix
Docusaurus JSON Schema PluginDocusaurus
>= 1.7.0 (current)3.x.y
<= 1.6.1 (legacy)2.x.y