jsonschema2md
Convert JSON Schemas to simple, human-readable Markdown documentation.
For example:
{
"$id": "https://example.com/person.schema.json",
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Person",
"description": "JSON Schema for a person object.",
"type": "object",
"properties": {
"firstName": {
"type": "string",
"description": "The person's first name."
},
"lastName": {
"type": "string",
"description": "The person's last name."
}
}
}
will be converted to:
Person
JSON Schema for a person object.
Properties
firstName(string): The person's first name.lastName(string): The person's last name.
See the examples directory for more elaborate examples.
Installation
Install with pip
pip install jsonschema2md
Usage
From the CLI
jsonschema2md [OPTIONS] <input.json> <output.md>
From Python
import json
import jsonschema2md
parser = jsonschema2md.Parser(
examples_as_yaml=False,
show_examples="all",
)
with open("./examples/food.json", "r") as json_file:
md_lines = parser.parse_schema(json.load(json_file))
print(''.join(md_lines))
Options
examples_as_yaml: Parse examples in YAML-format instead of JSON. (bool, default:False)show_examples: Parse examples for only the main object, only properties, or all. (str, defaultall, options:object,properties,all)
Contributing
Bugs, questions or suggestions? Feel free to post an issue in the issue tracker or to make a pull request! See Contributing.md for more info.
Changelog
See Changelog.md.
Metadata
Release files for jsonschema2md 0.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| jsonschema2md-0.4.0.tar.gz | 9.1 kB | Without provenance | Details for jsonschema2md-0.4.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| jsonschema2md-0.4.0-py3-none-any.whl | Python 3 | none | any | Details for jsonschema2md-0.4.0-py3-none-any.whl |
Total release size: 18.3 kB
Release files / jsonschema2md-0.4.0.tar.gz
| Download URL | jsonschema2md-0.4.0.tar.gz |
|---|---|
| Size | 9.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b0502b12085b286d79532657291d3ad2769193c4a81459f0644c79f166f6e411
|
|
BLAKE2b-256 checksum How to use checksums |
c189eaad555a0ef50b9462cfd390282bf2b0c185e12062c8fe7c6fc69aa7ea00
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10
|
Release files / jsonschema2md-0.4.0-py3-none-any.whl
| Download URL | jsonschema2md-0.4.0-py3-none-any.whl |
|---|---|
| Size | 9.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
506d7012f44b487f3b4e6447b322fe9f6a8a2161c548d4d90e7b1aeb27f01d9d
|
|
BLAKE2b-256 checksum How to use checksums |
029745db8d008eb2bdcb6e186cf535229efd8a5cafa4e6b84b19c7ceb0cacdb7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10
|
Security for jsonschema2md 0.4.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.