JSON Schema is a vocabulary that allows you to validate, annotate, and manipulate JSON documents.
This repository contains the sources for the work in progress of the next set of JSON Schema IETF Internet Draft (I-D) documents. For the latest released I-Ds, please see the Specification page on the website.
Reviews, comments and suggestions are most welcome! Please read our guidelines for contributing.
For the current status of issues and pull requests, please see the following labels
Labels are assigned based on Sensible Github Labels.
To build the spec files to HTML from the Markdown sources, run npm run build
.
You can also build each individually with npm run build-core
and npm run build-validation
.
The spec is built using Remark, a markdown engine with good support for plugins and lots of existing plugins we can use.
The following is a not-necessarily-complete list of configured plugins and the features they make available to you.
-
remark-lint -- Enforce markdown styles guide.
-
remark-validate-links -- Check for broken links.
-
remark-gfm -- Adds support for Github Flavored Markdown specific markdown features such as autolink literals, footnotes, strikethrough, tables, and tasklists.
-
remark-heading-id -- Adds support for
{#my-anchor}
syntax to add anid
to an element so it can be referenced using URI fragment syntax. -
remark-headings -- A collection of enhancements for headings.
- Adds hierarchical section numbers to headings.
- Use the
[Appendix]
prefix on headings that should be numbered as an appendix.
- Use the
- Adds id anchors to headers that don't have one
- Example:
#section-2-13
- Example:
#appendix-a
- Example:
- Makes the heading a link utilizing its anchor
- Adds hierarchical section numbers to headings.
-
remark-reference-links -- Adds new syntax for referencing a section of the spec using the section number as the link text.
- Example:
## Foo {#foo} ## Bar This is covered in {{foo}} // --> Renders to "This is covered in [Section 2.3](#foo)" - Link text will use "Section" or "Appendix" as needed
-
remark-table-of-contents -- Adds a table of contents in a section with a header called "Table of Contents".
-
remark-code-titles -- Add titles to code blocks
- Example:
\`\`\`jsonschema "My Fun Title" { "type": "string" } \`\`\`
- The languages
jsonschema
andjson
have special styling - The title will be parsed as a JSON string, but you have to double escape
escaped characters. So, to get
My "quoted" title
, you would need to be"My \\\\"quoted\\\\" title"
.
- Example:
-
remark-torchlight -- Syntax highlighting and more using https://torchlight.dev. Features include line numbers and line highlighting.
-
remark-flexible-containers -- Add a callout box using the following syntax. Supported container types are
warning
,note
, andexperimental
.::: {type} {title} {content} :::
To build components that are being maintained as IETF Internet-Drafts, run
make
. The Makefile will create the necessary Python venv for you as part of
the regular make target.
make clean
will remove all output including the venv. To clean just the spec
output and keep the venv, use make spec-clean
.
If you want to run xml2rfc
manually after running make for the first time, you
will need to activate the virtual environment: source .venv/bin/activate
.
The version of "xml2rfc" that this project uses is updated by modifying
requirements.in
and running pip-compile requirements.in
.
Descriptions of the xml2rfc, I-D documents, and RFC processes:
- https://xml2rfc.tools.ietf.org/authoring/draft-mrose-writing-rfcs.html
- https://www.ietf.org/tao.html
- https://www.ietf.org/ietf-ftp/1id-guidelines.html
- https://www.rfc-editor.org/rfc/rfc7322.txt
Conformance tests for JSON Schema and its vocabularies may be found in their own repository.
The JSON Schema web site is at http://json-schema.org/
The source for the website is maintained in a separate repository.
This project exists thanks to all the people who contribute. [Contribute].
Become a financial contributor and help us sustain our community. [Contribute]
Here are our top sponsors. You could be next! [Become a sponsor]
The contents of this repository are licensed under either the BSD 3-clause license or the Academic Free License v3.0.