jsonschema_diff.sphinx.directive

Sphinx directive to embed a Rich‑rendered JSON‑schema diff as SVG.

Usage:

.. jsonschemadiff:: old.json new.json
   :name:   my_diff.svg   # optional custom file name (".svg" can be omitted)
   :title:  Schema Diff   # title shown inside the virtual terminal tab
   :no-body:             # hide diff body, keep legend only
   :no-legend:           # hide legend, show body only
   :width:  80%          # pass through to the resulting <img> tag

All options are optional; sensible defaults are applied when omitted.

Classes

JsonSchemaDiffDirective

Embed an SVG diff between two JSON‑schema files.

Module Contents

class JsonSchemaDiffDirective(
name,
arguments,
options,
content,
lineno,
content_offset,
block_text,
state,
state_machine,
)[source]

Embed an SVG diff between two JSON‑schema files.

has_content = False[source]

May the directive have content?

required_arguments = 2[source]

Number of required directive arguments.

option_spec[source]

Mapping of option names to validator functions.

run() List[docutils.nodes.Node][source]