zenitysec / sphinx-rego

Sphinx extension that automatically documents Open Policy Agent Rego policies

Home Page:https://zenity.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

sphinx-rego

A sphinx extension that automatically documents Open Policy Agent Rego policies using the rego_metadoc property.

Maintained by Zenity.

Example

See example/ dir for a documented usage example.

Sphinx Docs

Prerequisites

Installation:

Install with PIP

pip3 install sphinx-rego

Add to Sphinx conf.py

extensions += ["sphinxrego.ext"]

Usage Example:

.. rego::
   :policy: policies/**/*.rego
   :norecursive:
   :nocustom:

Arguments:

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

About

Sphinx extension that automatically documents Open Policy Agent Rego policies

https://zenity.io

License:MIT License


Languages

Language:Python 83.9%Language:Batchfile 6.5%Language:Makefile 5.4%Language:Open Policy Agent 4.3%