❓ FAQ
Frequently asked questions
How can I contribute ?
Any contribution is welcome! Read more here.
How to swizzling components ?
- npm
- Yarn
- pnpm
npm run swizzle docusaurus-json-schema-plugin [component name] -- --typescript
yarn swizzle docusaurus-json-schema-plugin [component name] --typescript
pnpm 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 :
- You have an error not related to
docusaurus-json-schema-pluginin your codebase like this one : missing language(s) in prism config / ... - You broke the rules of hooks or one of your dependancies did
- 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 :
- docusaurus write-translations CLI command
- Internationalization
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 ?
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 Plugin | Docusaurus |
|---|---|
>= 1.7.0 (current) | 3.x.y |
<= 1.6.1 (legacy) | 2.x.y |