Metadata-Version: 2.4
Name: sphinx-config-schema
Version: 0.0.4
Summary: Render a JSON schema as a copyable TOML, YAML, or JSON example with tooltips in Sphinx
Author: Common Partial Wave Analysis
License-Expression: MIT
Project-URL: Changelog, https://github.com/ComPWA/sphinx-config-schema/releases
Project-URL: Documentation, https://compwa.github.io/sphinx-config-schema
Project-URL: Homepage, https://compwa.github.io/sphinx-config-schema
Project-URL: Issues, https://github.com/ComPWA/sphinx-config-schema/issues
Project-URL: Source, https://github.com/ComPWA/sphinx-config-schema
Keywords: json-schema,sphinx,toml,yaml
Classifier: Development Status :: 3 - Alpha
Classifier: Framework :: Sphinx :: Extension
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Programming Language :: Python :: 3.15
Classifier: Topic :: Documentation :: Sphinx
Classifier: Typing :: Typed
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: docutils
Requires-Dist: pygments
Requires-Dist: sphinx
Requires-Dist: sphinx-tippy
Requires-Dist: typing-extensions>=4.14
Dynamic: license-file

# sphinx-config-schema

[![License](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
[![PyPI package](https://badge.fury.io/py/sphinx-config-schema.svg)](https://pypi.org/project/sphinx-config-schema)
[![Supported Python versions](https://img.shields.io/pypi/pyversions/sphinx-config-schema)](https://pypi.org/project/sphinx-config-schema)
[![pre-commit.ci status](https://results.pre-commit.ci/badge/github/ComPWA/sphinx-config-schema/main.svg)](https://results.pre-commit.ci/latest/github/ComPWA/sphinx-config-schema/main)
[![CI status](https://github.com/ComPWA/sphinx-config-schema/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/ComPWA/sphinx-config-schema/actions/workflows/ci.yml?query=branch%3Amain)
[![Test coverage](https://codecov.io/gh/ComPWA/sphinx-config-schema/branch/main/graph/badge.svg)](https://codecov.io/gh/ComPWA/sphinx-config-schema)
[![Spelling checked](https://img.shields.io/badge/cspell-checked-brightgreen.svg)](https://github.com/streetsidesoftware/cspell/tree/main/packages/cspell)
[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier)
[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/charliermarsh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
[![uv](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/uv/main/assets/badge/v0.json)](https://github.com/astral-sh/uv)
[![ty](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ty/main/assets/badge/v0.json)](https://github.com/astral-sh/ty)

`sphinx-config-schema` is a [Sphinx](https://www.sphinx-doc.org) extension that renders a [JSON schema](https://json-schema.org) as a copyable TOML, YAML, or JSON example. Each key shows the description of its setting as a tooltip and links to itself as a permalink.

```bash
pip install sphinx-config-schema
```

Then add the extension to your `conf.py`:

```python
extensions = [
    "sphinx_config_schema",
]
```

and render a schema in a reStructuredText page:

```rst
.. config-schema:: example.schema.json
    :caption: pyproject.toml
    :table: tool.example
    :format: toml
```

or in a MyST Markdown page:

````md
```{config-schema} example.schema.json
:caption: pyproject.toml
:table: tool.example
:format: toml
```
````

See [compwa.github.io/sphinx-config-schema](https://compwa.github.io/sphinx-config-schema) for the documentation and a rendered example.
