A sphinx extension that automatically documents Open Policy Agent Rego policies using the rego_metadoc property.
Maintained by Zenity.
See example/ dir for a documented usage example.
- Install Open Policy Agent
- Make sure the
opa
CLI is available
Install with PIP
pip3 install sphinx-rego
Add to Sphinx conf.py
extensions += ["sphinxrego.ext"]
.. rego::
:policy: policies/**/*.rego
:norecursive:
:nocustom:
policy: glob pathname to search for .rego policies with rego_metadoc property
norecursive: whether to use glob recursive option
norecursive: whether to include custom properties