jsonschema2md is a Python library designed to convert JSON Schema definitions into human-readable Markdown documentation. It is actively maintained, with frequent updates that introduce new features and improvements, currently at version 1.7.0. It simplifies the process of generating clear and structured documentation directly from your JSON Schema files.
pip install jsonschema2mdVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to instantiate the Parser with basic options, load a JSON Schema, and convert it into Markdown string output. The resulting Markdown can then be written to a file or displayed.
Always verify installation method (`pip`) and import statements for the Python package.
Consult the library's GitHub repository or documentation for a list of supported JSON Schema keywords if encountering unexpected output for specific schema features.
Upgrade to version 1.7.0 or newer to ensure robust handling of external references.
Initialize the parser with `parser = jsonschema2md.Parser(show_deprecated=False, ...)` to hide deprecated fields.
Upgrade to version 1.6.0 or newer and use the appropriate configuration for localization.
Ensure that all entries within the 'properties' or 'definitions' section of your JSON schema are valid JSON objects, even if they describe a simple type; they must be structured as an object with at least a 'type' key.
Set the 'show_examples' parameter to one of the allowed string values: 'all', 'object', or 'properties'.
Verify that all $ref paths are correct and accessible. For external files, ensure they are in the expected directory structure or provide a base URI if necessary. Simplify complex or deeply nested schemas, and ensure there are no unresolvable circular references.
Break down large schemas into smaller, more manageable files. Review the schema for overly complex or unintended recursive definitions that could lead to performance bottlenecks or processing hangs. Ensure that circular references are properly handled or avoided where possible.