
Security News
How Enterprise Security Is Adapting to AI-Accelerated Threats
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.
@digidem/jsonschema2md
Advanced tools
Documenting and validating complex JSON Schemas can be hard. This tool makes it easier by providing a number of scripts that can turn JSON Schema files into readable Markdown documentation that is ready for consumption on GitHub or processed using Jekyll or other static site generators.
These tools have been introduced by Adobe to document Adobe's Experience Data Models (XDM), but can be used for other JSON Schema documents, too.
npm version 3.10.8 or upnode v8 or upUsing the schemas in examples/schemas, the output in examples/docs has been generated.
# clone this project
$ npm install -g @adobe/jsonschema2md
# show usage information
$ jsonschema2md
# run task
# leave out the -v "06", when you have draft-07 schemas
$ jsonschema2md -d examples/schemas -o examples/docs -v "06"
# generated output for whole folder is written to ./examples/docs
jsonschema2md assumes draft-07 by default. If your schemas are not on draft-07, you can specify the draft version using the -v or --draft flag.
# run against JSON Schema Draft 04
$ jsonschema2md -d examples/schemas -o examples/docs -v 04
# run against JSON Schema Draft 06
$ jsonschema2md -d examples/schemas -o examples/docs -v 06
npmYou can conveniently use the JSON Schema Markdown Tools from npm. This makes it possible to set up a conversion toolchain for your JSON Schema project that is driven entirely by npm. To do so, first define the dependency by adding this to your "devDependencies" section of package.json
"devDependencies": {
"@adobe/jsonschema2md": "^1.0.6"
}
Then add the following to the "scripts" section of your package.json and adapt accordingly:
"scripts": {
"prepare": "mkdir -p docs/reference && jsonschema2md -o docs/reference -d schemas/draft-04
}
If you run npm install before running npm run prepare, npm will install the @adobe/jsonschema2md in a node_modules/.bin path, even if you did not install the JSON Schema Markdown beforehand.
Ensure you have all the dependencies installed via npm install, then run:
npm test
This will run our Jasmine test suite as well as lint the JavaScript according to our style guide (see below).
Continuous integration runs on CircleCI.
All pull requests automatically trigger a job that runs the tests by executing the config.yml.
You can run npm run cover to get a code coverage report, that is, a sense of how much of the project's code is "covered" by the test suite.
This project uses eslint to enforce JavaScript coding style. To run the linter:
npm run lint
Please see Contributing.md for details. Pull requests are welcome.
Copyright 2017 Adobe Systems Incorporated. All rights reserved. This file is licensed to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
FAQs
Validate and document complex JSON Schemas the easy way.
We found that @digidem/jsonschema2md demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 5 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.

Security News
Experts push back on new claims about AI-driven ransomware, warning that hype and sponsored research are distorting how the threat is understood.